{
	"openapi": "3.1.0",
	"paths": {
		"/api/v1/login/sessions": {
			"post": {
				"description": "Create a hosted login session and get a URL to send the user to.\n\nUse this when you don't want to run an OIDC client — typically a native app that opens `loginUrl` in an in-app browser.\n\n**Flow:**\n1. `POST` here to get `loginUrl`\n2. Open it; the user authenticates with BankID on sajn's hosted page\n3. We redirect to your `redirectUri` with `?sessionId=…` (and `?state=…` if you sent one)\n4. `GET /api/v1/login/sessions/{id}` **from your server** to read the result\n\n**The redirect is only a handle.** Never trust it as proof of authentication — anyone can craft that URL. The server-side `GET` is the authoritative read, because it is authenticated as your organization.\n\n`redirectUri` must be registered on the client. Custom schemes (`myapp://auth`) are supported so the in-app browser can dismiss straight back into your app.",
				"summary": "Start a sajn Login session",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createLoginSession",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"clientId": {
										"type": "string",
										"minLength": 1,
										"description": "The sajn Login client to authenticate against."
									},
									"redirectUri": {
										"type": "string",
										"minLength": 1,
										"description": "Where to send the user when authentication finishes. Must be registered on the client."
									},
									"state": {
										"description": "Opaque value echoed back on the redirect and in the session result.",
										"type": "string",
										"maxLength": 512
									}
								},
								"required": [
									"clientId",
									"redirectUri"
								]
							},
							"example": {
								"clientId": "cm4k2x9p10039abcd1234efgh",
								"redirectUri": "https://example.com/auth/callback",
								"state": "f9a1c2e3"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The sajn Login session ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"PENDING",
												"COMPLETED",
												"FAILED",
												"EXPIRED"
											]
										},
										"method": {
											"description": "The eID the user authenticated with, such as `SE_BANKID`. Null until `status` is `COMPLETED`.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"completedAt": {
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"state": {
											"type": [
												"string",
												"null"
											]
										},
										"sub": {
											"type": [
												"string",
												"null"
											]
										},
										"claims": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"sub": {
													"type": "string"
												},
												"amr": {
													"type": "array",
													"items": {
														"type": "string"
													}
												},
												"auth_time": {
													"type": "number"
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"given_name": {
													"type": [
														"string",
														"null"
													]
												},
												"family_name": {
													"type": [
														"string",
														"null"
													]
												},
												"birthdate": {
													"type": [
														"string",
														"null"
													]
												},
												"nin": {
													"type": [
														"string",
														"null"
													]
												},
												"nin_type": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"sub",
												"amr",
												"auth_time",
												"name",
												"given_name",
												"family_name",
												"birthdate",
												"nin",
												"nin_type"
											],
											"additionalProperties": false,
											"description": "The claims your client is approved for. A claim it isn't approved for is null."
										},
										"loginUrl": {
											"description": "Open this in a browser or an in-app browser to authenticate the user. Set only in the response to the create request; null otherwise.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "When the user must have authenticated by. Set only in the response to the create request; null otherwise.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"status",
										"method",
										"completedAt",
										"state",
										"sub",
										"claims",
										"loginUrl",
										"expiresAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10033abcd1234efgh",
									"status": "COMPLETED",
									"method": "SE_BANKID",
									"completedAt": "2026-09-29T07:41:00.000Z",
									"state": "f9a1c2e3",
									"sub": "sajn|7f3e1c92b4",
									"claims": {
										"sub": "sajn|7f3e1c92b4",
										"amr": [
											"SE_BANKID"
										],
										"auth_time": 1790667660,
										"name": "Kai Lindqvist",
										"given_name": "Kai",
										"family_name": "Lindqvist",
										"birthdate": "1990-01-01",
										"nin": "191212121212",
										"nin_type": "SE_PERSONNUMMER"
									},
									"loginUrl": "https://login.sajn.se/l/cm4k2x9p10033abcd1234efgh/open",
									"expiresAt": "2026-10-28T22:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "clientId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires login:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"login:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Sajn Login session not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "login_session"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"login:write"
						]
					}
				]
			}
		},
		"/api/v1/login/sessions/{id}": {
			"get": {
				"description": "Authoritative read of a login session. Call this from your server after the redirect.\n\n`claims` and `sub` are populated only once `status` is `COMPLETED`, and contain exactly the fields your client is approved for — the same projection the OIDC `id_token` uses.\n\n`sub` is stable per person **per organization**: the same individual logging into any of your clients always yields the same `sub`, and it can never be correlated with their identifier at another sajn customer.",
				"summary": "Read the result of a sajn Login session",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The sajn Login session ID.",
						"example": "cm4k2x9p10033abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getLoginSession",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The sajn Login session ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"PENDING",
												"COMPLETED",
												"FAILED",
												"EXPIRED"
											]
										},
										"method": {
											"description": "The eID the user authenticated with, such as `SE_BANKID`. Null until `status` is `COMPLETED`.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"completedAt": {
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"state": {
											"type": [
												"string",
												"null"
											]
										},
										"sub": {
											"type": [
												"string",
												"null"
											]
										},
										"claims": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"sub": {
													"type": "string"
												},
												"amr": {
													"type": "array",
													"items": {
														"type": "string"
													}
												},
												"auth_time": {
													"type": "number"
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"given_name": {
													"type": [
														"string",
														"null"
													]
												},
												"family_name": {
													"type": [
														"string",
														"null"
													]
												},
												"birthdate": {
													"type": [
														"string",
														"null"
													]
												},
												"nin": {
													"type": [
														"string",
														"null"
													]
												},
												"nin_type": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"sub",
												"amr",
												"auth_time",
												"name",
												"given_name",
												"family_name",
												"birthdate",
												"nin",
												"nin_type"
											],
											"additionalProperties": false,
											"description": "The claims your client is approved for. A claim it isn't approved for is null."
										},
										"loginUrl": {
											"description": "Open this in a browser or an in-app browser to authenticate the user. Set only in the response to the create request; null otherwise.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "When the user must have authenticated by. Set only in the response to the create request; null otherwise.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"status",
										"method",
										"completedAt",
										"state",
										"sub",
										"claims",
										"loginUrl",
										"expiresAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10033abcd1234efgh",
									"status": "COMPLETED",
									"method": "SE_BANKID",
									"completedAt": "2026-09-29T07:41:00.000Z",
									"state": "f9a1c2e3",
									"sub": "sajn|7f3e1c92b4",
									"claims": {
										"sub": "sajn|7f3e1c92b4",
										"amr": [
											"SE_BANKID"
										],
										"auth_time": 1790667660,
										"name": "Kai Lindqvist",
										"given_name": "Kai",
										"family_name": "Lindqvist",
										"birthdate": "1990-01-01",
										"nin": "191212121212",
										"nin_type": "SE_PERSONNUMMER"
									},
									"loginUrl": "https://login.sajn.se/l/cm4k2x9p10033abcd1234efgh/open",
									"expiresAt": "2026-10-28T22:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires login:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"login:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Sajn Login session not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "login_session"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"login:read"
						]
					}
				]
			}
		},
		"/api/v1/login/sessions/{id}/start": {
			"post": {
				"description": "Authenticate the user in your own interface instead of sajn's hosted page. You show the QR code and the button that opens the eID app; sajn talks to the eID provider.\n\n**Flow:**\n1. `POST /api/v1/login/sessions` to create the session\n2. `POST` here, from your server, with the user's IP address. Show `qrCode` on desktop, or open `autoStartUrl` from a tap on mobile\n3. `POST /api/v1/login/sessions/{id}/poll` every 1 to 2 seconds and show the new `qrCode`\n4. When `status` is `COMPLETED`, read the result with `GET /api/v1/login/sessions/{id}`\n\nCalling this again while an attempt runs returns that attempt. After a `FAILED` or `EXPIRED` attempt, calling it starts a new one while `attemptsRemaining` is above 0. The client must use your own BankID certificate.",
				"summary": "Start an eID attempt in your own UI",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"description": "The login session ID, from `POST /api/v1/login/sessions`.",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10033abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "startLoginAttempt",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"method": {
										"description": "The eID to authenticate with, such as `SE_BANKID`. Leave it out when the client allows one method.",
										"type": "string",
										"enum": [
											"SE_BANKID"
										]
									},
									"endUserIp": {
										"anyOf": [
											{
												"type": "string",
												"format": "ipv4",
												"pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
											},
											{
												"type": "string",
												"format": "ipv6",
												"pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"
											}
										],
										"description": "The IP address of the person authenticating, as your server sees it. Never your server's own address."
									},
									"userAgent": {
										"description": "The user agent of the person's browser. It improves the eID provider's risk check and lets `autoStartUrl` return to the right browser.",
										"type": "string",
										"maxLength": 1024
									},
									"returnUrl": {
										"description": "Where the eID app sends a user on the same device when they are done. Must be registered on the client. Leave it out and the user switches back by hand.",
										"type": "string"
									}
								},
								"required": [
									"endUserIp"
								]
							},
							"example": {
								"method": "SE_BANKID",
								"endUserIp": "192.0.2.10",
								"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15",
								"returnUrl": "https://example.com/logga-in"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The login session."
										},
										"method": {
											"type": "string",
											"enum": [
												"SE_BANKID"
											]
										},
										"qrCode": {
											"description": "Render this as a QR code for a user on another device. It changes every second, so show the `qrCode` from each poll.",
											"type": [
												"string",
												"null"
											]
										},
										"autoStartToken": {
											"description": "Opens the eID app on this device if you build the link yourself. Null when the call resumed an attempt that was already running.",
											"type": [
												"string",
												"null"
											]
										},
										"autoStartUrl": {
											"description": "Open this on the user's device, from a tap, to launch the eID app. Null when the call resumed an attempt that was already running.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the user must have finished this attempt by."
										}
									},
									"required": [
										"id",
										"method",
										"qrCode",
										"autoStartToken",
										"autoStartUrl",
										"expiresAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10033abcd1234efgh",
									"method": "SE_BANKID",
									"qrCode": "bankid.67df3917-fa0d-44e5-b327-edcc928297f8.7.dd5bb5f5e2a4fbb09bc6eaaa0a5fd1f3e2a1b7d4e0c9f8a6b5d4c3b2a1908f7e",
									"autoStartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
									"autoStartUrl": "https://app.bankid.com/?autostarttoken=7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6&redirect=null",
									"expiresAt": "2026-10-28T22:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "endUserIp",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires login:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"login:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Sajn Login session not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "login_session"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"login:write"
						]
					}
				]
			}
		},
		"/api/v1/login/sessions/{id}/poll": {
			"post": {
				"description": "Check the current attempt with the eID provider and get the next QR code. Poll every 1 to 2 seconds while `status` is `PENDING`. The login completes even if you stop polling, and `login.completed` fires.",
				"summary": "Poll an eID attempt",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"description": "The login session ID, from `POST /api/v1/login/sessions`.",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10033abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "pollLoginAttempt",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {}
							},
							"example": {}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The login session."
										},
										"status": {
											"type": "string",
											"enum": [
												"PENDING",
												"COMPLETED",
												"FAILED",
												"EXPIRED"
											],
											"description": "The state of the current attempt."
										},
										"hintCode": {
											"description": "What the eID provider reports, such as `outstandingTransaction`, `userSign` or `userCancel`. Use it to tell the user what to do.",
											"type": [
												"string",
												"null"
											]
										},
										"qrCode": {
											"description": "The current QR code while `status` is `PENDING`; null otherwise.",
											"type": [
												"string",
												"null"
											]
										},
										"attemptsRemaining": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "How many more attempts this session can start."
										}
									},
									"required": [
										"id",
										"status",
										"hintCode",
										"qrCode",
										"attemptsRemaining"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10033abcd1234efgh",
									"status": "COMPLETED",
									"hintCode": "outstandingTransaction",
									"qrCode": "bankid.67df3917-fa0d-44e5-b327-edcc928297f8.7.dd5bb5f5e2a4fbb09bc6eaaa0a5fd1f3e2a1b7d4e0c9f8a6b5d4c3b2a1908f7e",
									"attemptsRemaining": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires login:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"login:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Sajn Login session not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "login_session"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"login:write"
						]
					}
				]
			}
		},
		"/api/v1/login/sessions/{id}/cancel": {
			"post": {
				"description": "Cancel the current attempt, for example when the user presses Cancel. The session stays open, so the user can start a new attempt. If the user finished in the eID app just before, `status` is `COMPLETED`.",
				"summary": "Cancel an eID attempt",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"description": "The login session ID, from `POST /api/v1/login/sessions`.",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10033abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "cancelLoginAttempt",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {}
							},
							"example": {}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The login session."
										},
										"status": {
											"type": "string",
											"enum": [
												"PENDING",
												"COMPLETED",
												"FAILED",
												"EXPIRED"
											],
											"description": "The state of the current attempt."
										},
										"hintCode": {
											"description": "What the eID provider reports, such as `outstandingTransaction`, `userSign` or `userCancel`. Use it to tell the user what to do.",
											"type": [
												"string",
												"null"
											]
										},
										"qrCode": {
											"description": "The current QR code while `status` is `PENDING`; null otherwise.",
											"type": [
												"string",
												"null"
											]
										},
										"attemptsRemaining": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "How many more attempts this session can start."
										}
									},
									"required": [
										"id",
										"status",
										"hintCode",
										"qrCode",
										"attemptsRemaining"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10033abcd1234efgh",
									"status": "COMPLETED",
									"hintCode": "outstandingTransaction",
									"qrCode": "bankid.67df3917-fa0d-44e5-b327-edcc928297f8.7.dd5bb5f5e2a4fbb09bc6eaaa0a5fd1f3e2a1b7d4e0c9f8a6b5d4c3b2a1908f7e",
									"attemptsRemaining": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires login:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"login:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Sajn Login session not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "login_session"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"login:write"
						]
					}
				]
			}
		},
		"/api/v1/embed-sessions": {
			"post": {
				"description": "Start an embedded signing session for one party of a sent document, to show in your own page with the sajn embed SDK.\n\n**Flow:**\n1. `POST` here **from your server** when the party opens your page.\n2. Return `clientSecret` to your page and hand it to the SDK, in `fetchClientSecret`.\n3. The SDK frames `/embed/v2/{id}` and the frame redeems the secret. The party signs in the frame.\n4. Confirm the outcome with the `document.party.signed` webhook. Events in the browser are hints, not proof.\n\nThe session decides what the frame may do: `features`, `appearance` and `origins` can't be changed from the browser. A session lasts at most 24 hours, and ends after an hour without activity. When it ends, the SDK calls `fetchClientSecret` again, so keep that endpoint cheap.\n\nEmbedded signing is turned on per organization by sajn. Each origin must match one of the organization's embed domains. Create sessions with an API key: an OAuth app can't, because a session ends when the key that created it is rotated or deleted.",
				"summary": "Create an embed session",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createEmbedSession",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"type": {
										"default": "signing",
										"description": "What the frame shows. `signing` lets the party sign a sent document. `viewing` shows a sent or completed document to any party, read-only.",
										"type": "string",
										"enum": [
											"signing",
											"viewing"
										]
									},
									"documentId": {
										"type": "string",
										"minLength": 1,
										"description": "A sent document."
									},
									"partyId": {
										"type": "string",
										"minLength": 1,
										"description": "The party who signs in the frame."
									},
									"origins": {
										"description": "The pages that may show the frame, such as `https://app.example.com`. Each must match one of your organization's embed domains. Leave it out to allow every embed domain.",
										"minItems": 1,
										"maxItems": 10,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1,
											"maxLength": 512
										}
									},
									"ancestorOrigins": {
										"description": "Extra pages further up the frame chain, when your page is itself framed, such as inside a CRM.",
										"maxItems": 10,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1,
											"maxLength": 512
										}
									},
									"features": {
										"description": "What the party may do besides signing. Leave a feature out for its default.",
										"type": "object",
										"properties": {
											"rejection": {
												"default": false,
												"description": "Let the party reject the document.",
												"type": "boolean"
											},
											"delegation": {
												"default": false,
												"description": "Let the party delegate signing to someone else.",
												"type": "boolean"
											},
											"download": {
												"default": false,
												"description": "Let the party download the document.",
												"type": "boolean"
											}
										}
									},
									"appearance": {
										"type": "object",
										"properties": {
											"colors": {
												"type": "object",
												"properties": {
													"background": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													},
													"foreground": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													},
													"muted": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													},
													"mutedForeground": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													},
													"primary": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													},
													"primaryForeground": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													},
													"border": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													},
													"destructive": {
														"type": "string",
														"pattern": "^#(?:[0-9a-f]{3}|[0-9a-f]{6})$"
													}
												}
											},
											"radius": {
												"description": "Corner radius in pixels.",
												"type": "integer",
												"minimum": 0,
												"maximum": 24
											},
											"fontFamily": {
												"type": "string",
												"enum": [
													"default",
													"system",
													"serif"
												]
											},
											"colorScheme": {
												"type": "string",
												"enum": [
													"light",
													"dark",
													"system"
												]
											},
											"mode": {
												"description": "`inline` grows the frame to fit and lets the host page scroll. `fixed` scrolls inside the frame.",
												"type": "string",
												"enum": [
													"inline",
													"fixed"
												]
											},
											"header": {
												"description": "Show the bar with the document name. Defaults to true.",
												"type": "boolean"
											},
											"scrollIndicator": {
												"description": "Show a hint to scroll down until the sign section is in view. Defaults to true. Only in `fixed` mode, where the frame scrolls.",
												"type": "boolean"
											},
											"documentId": {
												"description": "Show the document ID under the sign button. Defaults to false.",
												"type": "boolean"
											}
										}
									},
									"signatureInputModes": {
										"description": "Narrows how the party can draw a signature. Your workspace setting is the ceiling.",
										"maxItems": 3,
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"DRAW",
												"TYPE",
												"UPLOAD"
											]
										}
									},
									"locale": {
										"description": "The frame's language. Defaults to the document's language.",
										"type": "string",
										"enum": [
											"sv",
											"en",
											"no",
											"da",
											"fi",
											"de",
											"is",
											"es",
											"fr",
											"it"
										]
									},
									"externalId": {
										"description": "Your own reference, returned on every frame event.",
										"type": "string",
										"maxLength": 255
									},
									"bankIdReturnUrl": {
										"description": "For a native app only: your app's URL scheme, such as `myapp://signed`, where the BankID app sends the party after signing on the same phone. Web URLs are refused, because iOS opens them in a new tab. In a browser, the party switches back to the page from the BankID app.",
										"type": "string",
										"maxLength": 2048
									}
								},
								"required": [
									"documentId",
									"partyId"
								],
								"additionalProperties": false
							},
							"example": {
								"type": "signing",
								"documentId": "cm4k2x9p10003abcd1234efgh",
								"partyId": "cm4k2x9p10004abcd1234efgh",
								"origins": [
									"https://app.example.com"
								],
								"features": {
									"rejection": true,
									"download": true
								},
								"appearance": {
									"colors": {
										"primary": "#0f766e",
										"primaryForeground": "#ffffff"
									},
									"radius": 8,
									"mode": "inline"
								},
								"locale": "sv",
								"externalId": "EMP-0142"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The session id. Pass it to the SDK, or put it in the frame URL: it is not a secret."
										},
										"clientSecret": {
											"type": "string",
											"description": "Hand this to the SDK in the browser. The frame redeems it once, within 10 minutes. Never log it or put it in a URL."
										},
										"clientSecretExpiresAt": {
											"type": "string",
											"format": "date-time",
											"description": "When `clientSecret` expires if the frame hasn't redeemed it. Create a new session after this time."
										},
										"expiresAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the session ends, at the latest. It also ends after an hour without activity."
										},
										"documentId": {
											"type": "string",
											"description": "The document ID."
										},
										"partyId": {
											"type": "string",
											"description": "The party ID."
										}
									},
									"required": [
										"id",
										"clientSecret",
										"clientSecretExpiresAt",
										"expiresAt",
										"documentId",
										"partyId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"clientSecret": "Anställningsavtal – Kai Lindqvist",
									"clientSecretExpiresAt": "2026-09-28T09:12:00.000Z",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"partyId": "cm4k2x9p10004abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "documentId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				],
				"x-mint": {
					"metadata": {
						"tag": "Beta"
					},
					"content": "<Warning>Embedding v2 is in beta, and this endpoint can change in ways that break your integration before its first stable release, estimated for November 2026. See [Embedding v2](/guides/embedding-v2/overview).</Warning>"
				}
			}
		},
		"/api/v1/embed-sessions/{id}": {
			"delete": {
				"description": "End an embed session at once. A frame that shows it stops working on its next request. Revoking an API key also revokes every session it created.",
				"summary": "Revoke an embed session",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"description": "Embed session ID, `emb_…`",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "revokeEmbedSession",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The document ID."
										},
										"revoked": {
											"type": "boolean",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"revoked"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"revoked": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				],
				"x-mint": {
					"metadata": {
						"tag": "Beta"
					},
					"content": "<Warning>Embedding v2 is in beta, and this endpoint can change in ways that break your integration before its first stable release, estimated for November 2026. See [Embedding v2](/guides/embedding-v2/overview).</Warning>"
				}
			}
		},
		"/api/v1/forms": {
			"get": {
				"description": "List forms in the authenticated workspace, newest first. For incremental sync, set updatedAfter, sort by updatedAt ascending, and pass nextCursor as cursor until hasMore is false.",
				"summary": "List forms",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "enabled",
						"in": "query",
						"description": "If `true`, returns only published forms. If `false`, returns only unpublished forms.",
						"schema": {
							"type": "boolean"
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only forms created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only forms created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only forms updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only forms updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "orderBy",
						"in": "query",
						"description": "The field to sort by. Default: `createdAt`.",
						"schema": {
							"default": "createdAt",
							"type": "string",
							"enum": [
								"createdAt",
								"updatedAt"
							]
						}
					},
					{
						"name": "orderDirection",
						"in": "query",
						"description": "The sort direction. Default: `desc`.",
						"schema": {
							"default": "desc",
							"type": "string",
							"enum": [
								"asc",
								"desc"
							]
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getForms",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The form ID."
													},
													"templateId": {
														"type": "string",
														"description": "The ID of the template the form owns. Its documents are created from it."
													},
													"workspaceId": {
														"type": "string",
														"description": "The workspace ID."
													},
													"sender": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The member every document from the form is created and sent as."
													},
													"respondentPartyId": {
														"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
														"type": [
															"string",
															"null"
														]
													},
													"url": {
														"type": "string",
														"description": "The public form link."
													},
													"enabled": {
														"type": "boolean",
														"description": "True if the form is published."
													},
													"closedReason": {
														"description": "Why a published form stopped accepting submissions. Null while it's open.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"INCOMPLETE",
															"MAX_SUBMISSIONS",
															"EXPIRED",
															"SENDER_LEFT",
															null
														]
													},
													"hasPassword": {
														"type": "boolean",
														"description": "True if the link requires a password."
													},
													"name": {
														"description": "Name of the form, shown as the heading of the public form page.",
														"type": [
															"string",
															"null"
														]
													},
													"description": {
														"description": "Introduction shown under the heading.",
														"type": [
															"string",
															"null"
														]
													},
													"thankYouMessage": {
														"description": "Message shown after the respondent submits.",
														"type": [
															"string",
															"null"
														]
													},
													"redirectUrl": {
														"description": "URL the respondent goes to after submitting.",
														"type": [
															"string",
															"null"
														]
													},
													"documentExpiresInDays": {
														"type": "number",
														"description": "Days each document created from a submission stays signable."
													},
													"expiresAt": {
														"description": "When the form closes to new submissions. Null keeps it open.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"maxSubmissions": {
														"description": "Most submissions the form accepts. Null means no limit.",
														"type": [
															"number",
															"null"
														]
													},
													"submissionCount": {
														"type": "number",
														"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the form was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the form was last updated."
													}
												},
												"required": [
													"id",
													"templateId",
													"workspaceId",
													"sender",
													"respondentPartyId",
													"url",
													"enabled",
													"closedReason",
													"hasPassword",
													"name",
													"description",
													"thankYouMessage",
													"redirectUrl",
													"documentExpiresInDays",
													"expiresAt",
													"maxSubmissions",
													"submissionCount",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10023abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"workspaceId": "cm4k2x9p10001abcd1234efgh",
											"sender": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
											"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
											"enabled": true,
											"closedReason": null,
											"hasPassword": false,
											"name": "Intresseanmälan",
											"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
											"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
											"redirectUrl": null,
											"documentExpiresInDays": 30,
											"expiresAt": "2026-10-28T22:00:00.000Z",
											"maxSubmissions": 100,
											"submissionCount": 12,
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a blank form or an independent copy of templateId. The source template is unchanged. Copying a template additionally requires templates:read. Configure settings, the form's template, its fields and parties through the form endpoints, then publish. Use Idempotency-Key when retrying creation.",
				"summary": "Create a draft form",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createForm",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"templateId": {
										"type": "string",
										"minLength": 1,
										"description": "The template ID."
									}
								},
								"additionalProperties": false
							},
							"example": {
								"templateId": "cm4k2x9p10008abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"templateId": {
											"type": "string",
											"description": "The ID of the template the form owns. Its documents are created from it."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"sender": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member every document from the form is created and sent as."
										},
										"respondentPartyId": {
											"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
											"type": [
												"string",
												"null"
											]
										},
										"url": {
											"type": "string",
											"description": "The public form link."
										},
										"enabled": {
											"type": "boolean",
											"description": "True if the form is published."
										},
										"closedReason": {
											"description": "Why a published form stopped accepting submissions. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"INCOMPLETE",
												"MAX_SUBMISSIONS",
												"EXPIRED",
												"SENDER_LEFT",
												null
											]
										},
										"hasPassword": {
											"type": "boolean",
											"description": "True if the link requires a password."
										},
										"name": {
											"description": "Name of the form, shown as the heading of the public form page.",
											"type": [
												"string",
												"null"
											]
										},
										"description": {
											"description": "Introduction shown under the heading.",
											"type": [
												"string",
												"null"
											]
										},
										"thankYouMessage": {
											"description": "Message shown after the respondent submits.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL the respondent goes to after submitting.",
											"type": [
												"string",
												"null"
											]
										},
										"documentExpiresInDays": {
											"type": "number",
											"description": "Days each document created from a submission stays signable."
										},
										"expiresAt": {
											"description": "When the form closes to new submissions. Null keeps it open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"maxSubmissions": {
											"description": "Most submissions the form accepts. Null means no limit.",
											"type": [
												"number",
												"null"
											]
										},
										"submissionCount": {
											"type": "number",
											"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was last updated."
										},
										"questions": {
											"maxItems": 60,
											"type": "array",
											"items": {
												"oneOf": [
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"NAME"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"EMAIL"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PHONE"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"FIELD"
																]
															},
															"key": {
																"type": "string",
																"minLength": 1,
																"maxLength": 100
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"key"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"TEXT"
																]
															},
															"multiline": {
																"default": false,
																"type": "boolean"
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"multiline"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"HEADING"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PARAGRAPH"
																]
															},
															"text": {
																"type": "string",
																"maxLength": 4000
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													}
												]
											}
										},
										"slots": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"label": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"description": "The FORM subfield type, such as `INPUT` or `SELECT`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. Null when the subfield takes any value.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"key",
													"label",
													"type",
													"required",
													"options"
												],
												"additionalProperties": false
											},
											"description": "The keyed FORM subfields of the form's document that a `FIELD` question can fill."
										},
										"publishIssues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string"
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														]
													},
													"message": {
														"type": "string",
														"description": "What the issue is and how to fix it, in English."
													},
													"userMessage": {
														"type": "string",
														"description": "The same text in Swedish, with the names of the parties and questions involved, for your users."
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "What stops the form from publishing (`BLOCKER`) or deserves a look (`WARNING`). Empty when the form is ready."
										},
										"statistics": {
											"type": "object",
											"properties": {
												"started": {
													"type": "number",
													"description": "Submissions started, in any status."
												},
												"signed": {
													"type": "number",
													"description": "Submissions whose document was signed."
												}
											},
											"required": [
												"started",
												"signed"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"templateId",
										"workspaceId",
										"sender",
										"respondentPartyId",
										"url",
										"enabled",
										"closedReason",
										"hasPassword",
										"name",
										"description",
										"thankYouMessage",
										"redirectUrl",
										"documentExpiresInDays",
										"expiresAt",
										"maxSubmissions",
										"submissionCount",
										"createdAt",
										"updatedAt",
										"questions",
										"slots",
										"publishIssues",
										"statistics"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"sender": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
									"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
									"enabled": true,
									"closedReason": null,
									"hasPassword": false,
									"name": "Intresseanmälan",
									"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
									"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
									"redirectUrl": null,
									"documentExpiresInDays": 30,
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"maxSubmissions": 100,
									"submissionCount": 12,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"questions": [
										{
											"id": "name",
											"kind": "NAME",
											"label": "Namn",
											"required": true
										},
										{
											"id": "email",
											"kind": "EMAIL",
											"label": "E-post",
											"required": true
										},
										{
											"id": "startdatum",
											"kind": "FIELD",
											"key": "startdatum",
											"label": "Önskat startdatum",
											"required": true
										}
									],
									"slots": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"type": "DATEPICKER",
											"required": true,
											"options": null
										}
									],
									"publishIssues": [],
									"statistics": {
										"started": 14,
										"signed": 12
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "templateId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}": {
			"get": {
				"description": "Read settings, public URL, questions, bindable field slots, aggregate statistics and publishing issues. Password hashes and respondent answers are never included.",
				"summary": "Get a form",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getForm",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"templateId": {
											"type": "string",
											"description": "The ID of the template the form owns. Its documents are created from it."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"sender": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member every document from the form is created and sent as."
										},
										"respondentPartyId": {
											"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
											"type": [
												"string",
												"null"
											]
										},
										"url": {
											"type": "string",
											"description": "The public form link."
										},
										"enabled": {
											"type": "boolean",
											"description": "True if the form is published."
										},
										"closedReason": {
											"description": "Why a published form stopped accepting submissions. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"INCOMPLETE",
												"MAX_SUBMISSIONS",
												"EXPIRED",
												"SENDER_LEFT",
												null
											]
										},
										"hasPassword": {
											"type": "boolean",
											"description": "True if the link requires a password."
										},
										"name": {
											"description": "Name of the form, shown as the heading of the public form page.",
											"type": [
												"string",
												"null"
											]
										},
										"description": {
											"description": "Introduction shown under the heading.",
											"type": [
												"string",
												"null"
											]
										},
										"thankYouMessage": {
											"description": "Message shown after the respondent submits.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL the respondent goes to after submitting.",
											"type": [
												"string",
												"null"
											]
										},
										"documentExpiresInDays": {
											"type": "number",
											"description": "Days each document created from a submission stays signable."
										},
										"expiresAt": {
											"description": "When the form closes to new submissions. Null keeps it open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"maxSubmissions": {
											"description": "Most submissions the form accepts. Null means no limit.",
											"type": [
												"number",
												"null"
											]
										},
										"submissionCount": {
											"type": "number",
											"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was last updated."
										},
										"questions": {
											"maxItems": 60,
											"type": "array",
											"items": {
												"oneOf": [
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"NAME"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"EMAIL"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PHONE"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"FIELD"
																]
															},
															"key": {
																"type": "string",
																"minLength": 1,
																"maxLength": 100
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"key"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"TEXT"
																]
															},
															"multiline": {
																"default": false,
																"type": "boolean"
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"multiline"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"HEADING"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PARAGRAPH"
																]
															},
															"text": {
																"type": "string",
																"maxLength": 4000
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													}
												]
											}
										},
										"slots": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"label": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"description": "The FORM subfield type, such as `INPUT` or `SELECT`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. Null when the subfield takes any value.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"key",
													"label",
													"type",
													"required",
													"options"
												],
												"additionalProperties": false
											},
											"description": "The keyed FORM subfields of the form's document that a `FIELD` question can fill."
										},
										"publishIssues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string"
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														]
													},
													"message": {
														"type": "string",
														"description": "What the issue is and how to fix it, in English."
													},
													"userMessage": {
														"type": "string",
														"description": "The same text in Swedish, with the names of the parties and questions involved, for your users."
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "What stops the form from publishing (`BLOCKER`) or deserves a look (`WARNING`). Empty when the form is ready."
										},
										"statistics": {
											"type": "object",
											"properties": {
												"started": {
													"type": "number",
													"description": "Submissions started, in any status."
												},
												"signed": {
													"type": "number",
													"description": "Submissions whose document was signed."
												}
											},
											"required": [
												"started",
												"signed"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"templateId",
										"workspaceId",
										"sender",
										"respondentPartyId",
										"url",
										"enabled",
										"closedReason",
										"hasPassword",
										"name",
										"description",
										"thankYouMessage",
										"redirectUrl",
										"documentExpiresInDays",
										"expiresAt",
										"maxSubmissions",
										"submissionCount",
										"createdAt",
										"updatedAt",
										"questions",
										"slots",
										"publishIssues",
										"statistics"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"sender": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
									"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
									"enabled": true,
									"closedReason": null,
									"hasPassword": false,
									"name": "Intresseanmälan",
									"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
									"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
									"redirectUrl": null,
									"documentExpiresInDays": 30,
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"maxSubmissions": 100,
									"submissionCount": 12,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"questions": [
										{
											"id": "name",
											"kind": "NAME",
											"label": "Namn",
											"required": true
										},
										{
											"id": "email",
											"kind": "EMAIL",
											"label": "E-post",
											"required": true
										},
										{
											"id": "startdatum",
											"kind": "FIELD",
											"key": "startdatum",
											"label": "Önskat startdatum",
											"required": true
										}
									],
									"slots": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"type": "DATEPICKER",
											"required": true,
											"options": null
										}
									],
									"publishIssues": [],
									"statistics": {
										"started": 14,
										"signed": 12
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:read"
						]
					}
				]
			},
			"patch": {
				"description": "Omitted settings stay unchanged; nullable values can be cleared explicitly. Questions replace the complete ordered question list. Saving never publishes or changes the sender. Requires forms:write and documents:write, including for drafts. An edit introducing a blocker closes a published form until it is fixed and republished.",
				"summary": "Update form settings and questions",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateForm",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"description": "Name of the form, shown as the heading of the public form page.",
										"type": [
											"string",
											"null"
										],
										"maxLength": 200
									},
									"description": {
										"description": "Introduction shown under the heading.",
										"type": [
											"string",
											"null"
										],
										"maxLength": 4000
									},
									"thankYouMessage": {
										"description": "Message shown after the respondent submits.",
										"type": [
											"string",
											"null"
										],
										"maxLength": 4000
									},
									"redirectUrl": {
										"description": "http(s) URL the respondent goes to after submitting, in place of the thank-you message.",
										"type": [
											"string",
											"null"
										],
										"maxLength": 2000,
										"format": "uri"
									},
									"password": {
										"description": "Omit to keep the password, null to remove it, or a string to replace it.",
										"type": [
											"string",
											"null"
										],
										"minLength": 4,
										"maxLength": 100
									},
									"questions": {
										"description": "The complete ordered question list. Replaces the current list.",
										"maxItems": 60,
										"type": "array",
										"items": {
											"oneOf": [
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"maxLength": 40,
															"description": "The form ID."
														},
														"label": {
															"type": "string",
															"maxLength": 200
														},
														"placeholder": {
															"type": "string",
															"maxLength": 200
														},
														"description": {
															"type": "string",
															"maxLength": 1000
														},
														"width": {
															"type": "string",
															"enum": [
																"FULL",
																"HALF"
															]
														},
														"required": {
															"default": true,
															"type": "boolean"
														},
														"kind": {
															"type": "string",
															"enum": [
																"NAME"
															]
														}
													},
													"required": [
														"id",
														"kind"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"maxLength": 40,
															"description": "The form ID."
														},
														"label": {
															"type": "string",
															"maxLength": 200
														},
														"placeholder": {
															"type": "string",
															"maxLength": 200
														},
														"description": {
															"type": "string",
															"maxLength": 1000
														},
														"width": {
															"type": "string",
															"enum": [
																"FULL",
																"HALF"
															]
														},
														"required": {
															"default": true,
															"type": "boolean"
														},
														"kind": {
															"type": "string",
															"enum": [
																"EMAIL"
															]
														}
													},
													"required": [
														"id",
														"kind"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"maxLength": 40,
															"description": "The form ID."
														},
														"label": {
															"type": "string",
															"maxLength": 200
														},
														"placeholder": {
															"type": "string",
															"maxLength": 200
														},
														"description": {
															"type": "string",
															"maxLength": 1000
														},
														"width": {
															"type": "string",
															"enum": [
																"FULL",
																"HALF"
															]
														},
														"required": {
															"default": true,
															"type": "boolean"
														},
														"kind": {
															"type": "string",
															"enum": [
																"PHONE"
															]
														}
													},
													"required": [
														"id",
														"kind"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"maxLength": 40,
															"description": "The form ID."
														},
														"label": {
															"type": "string",
															"maxLength": 200
														},
														"placeholder": {
															"type": "string",
															"maxLength": 200
														},
														"description": {
															"type": "string",
															"maxLength": 1000
														},
														"width": {
															"type": "string",
															"enum": [
																"FULL",
																"HALF"
															]
														},
														"required": {
															"default": true,
															"type": "boolean"
														},
														"kind": {
															"type": "string",
															"enum": [
																"FIELD"
															]
														},
														"key": {
															"type": "string",
															"minLength": 1,
															"maxLength": 100
														}
													},
													"required": [
														"id",
														"kind",
														"key"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"maxLength": 40,
															"description": "The form ID."
														},
														"label": {
															"type": "string",
															"maxLength": 200
														},
														"placeholder": {
															"type": "string",
															"maxLength": 200
														},
														"description": {
															"type": "string",
															"maxLength": 1000
														},
														"width": {
															"type": "string",
															"enum": [
																"FULL",
																"HALF"
															]
														},
														"required": {
															"default": true,
															"type": "boolean"
														},
														"kind": {
															"type": "string",
															"enum": [
																"TEXT"
															]
														},
														"multiline": {
															"default": false,
															"type": "boolean"
														}
													},
													"required": [
														"id",
														"kind"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"maxLength": 40,
															"description": "The form ID."
														},
														"label": {
															"type": "string",
															"maxLength": 200
														},
														"placeholder": {
															"type": "string",
															"maxLength": 200
														},
														"description": {
															"type": "string",
															"maxLength": 1000
														},
														"width": {
															"type": "string",
															"enum": [
																"FULL",
																"HALF"
															]
														},
														"required": {
															"default": true,
															"type": "boolean"
														},
														"kind": {
															"type": "string",
															"enum": [
																"HEADING"
															]
														}
													},
													"required": [
														"id",
														"kind"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"maxLength": 40,
															"description": "The form ID."
														},
														"label": {
															"type": "string",
															"maxLength": 200
														},
														"placeholder": {
															"type": "string",
															"maxLength": 200
														},
														"description": {
															"type": "string",
															"maxLength": 1000
														},
														"width": {
															"type": "string",
															"enum": [
																"FULL",
																"HALF"
															]
														},
														"required": {
															"default": true,
															"type": "boolean"
														},
														"kind": {
															"type": "string",
															"enum": [
																"PARAGRAPH"
															]
														},
														"text": {
															"type": "string",
															"maxLength": 4000
														}
													},
													"required": [
														"id",
														"kind"
													]
												}
											]
										}
									},
									"expiresAt": {
										"description": "When the form closes to new submissions. Null keeps it open.",
										"type": [
											"string",
											"null"
										],
										"format": "date-time",
										"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
									},
									"maxSubmissions": {
										"description": "Most submissions the form accepts, counting active starts and submitted responses. Null means no limit.",
										"type": [
											"integer",
											"null"
										],
										"minimum": 1,
										"maximum": 100000
									},
									"documentExpiresInDays": {
										"description": "Days each document created from a submission stays signable.",
										"type": "integer",
										"minimum": 1,
										"maximum": 3650
									}
								},
								"additionalProperties": false
							},
							"example": {
								"name": "Intresseanmälan",
								"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
								"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
								"redirectUrl": null,
								"password": null,
								"questions": [
									{
										"id": "name",
										"kind": "NAME",
										"label": "Namn",
										"required": true
									},
									{
										"id": "email",
										"kind": "EMAIL",
										"label": "E-post",
										"required": true
									},
									{
										"id": "startdatum",
										"kind": "FIELD",
										"key": "startdatum",
										"label": "Önskat startdatum",
										"required": true
									}
								],
								"expiresAt": "2026-10-28T22:00:00.000Z",
								"maxSubmissions": 100,
								"documentExpiresInDays": 30
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"templateId": {
											"type": "string",
											"description": "The ID of the template the form owns. Its documents are created from it."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"sender": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member every document from the form is created and sent as."
										},
										"respondentPartyId": {
											"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
											"type": [
												"string",
												"null"
											]
										},
										"url": {
											"type": "string",
											"description": "The public form link."
										},
										"enabled": {
											"type": "boolean",
											"description": "True if the form is published."
										},
										"closedReason": {
											"description": "Why a published form stopped accepting submissions. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"INCOMPLETE",
												"MAX_SUBMISSIONS",
												"EXPIRED",
												"SENDER_LEFT",
												null
											]
										},
										"hasPassword": {
											"type": "boolean",
											"description": "True if the link requires a password."
										},
										"name": {
											"description": "Name of the form, shown as the heading of the public form page.",
											"type": [
												"string",
												"null"
											]
										},
										"description": {
											"description": "Introduction shown under the heading.",
											"type": [
												"string",
												"null"
											]
										},
										"thankYouMessage": {
											"description": "Message shown after the respondent submits.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL the respondent goes to after submitting.",
											"type": [
												"string",
												"null"
											]
										},
										"documentExpiresInDays": {
											"type": "number",
											"description": "Days each document created from a submission stays signable."
										},
										"expiresAt": {
											"description": "When the form closes to new submissions. Null keeps it open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"maxSubmissions": {
											"description": "Most submissions the form accepts. Null means no limit.",
											"type": [
												"number",
												"null"
											]
										},
										"submissionCount": {
											"type": "number",
											"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was last updated."
										},
										"questions": {
											"maxItems": 60,
											"type": "array",
											"items": {
												"oneOf": [
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"NAME"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"EMAIL"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PHONE"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"FIELD"
																]
															},
															"key": {
																"type": "string",
																"minLength": 1,
																"maxLength": 100
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"key"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"TEXT"
																]
															},
															"multiline": {
																"default": false,
																"type": "boolean"
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"multiline"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"HEADING"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PARAGRAPH"
																]
															},
															"text": {
																"type": "string",
																"maxLength": 4000
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													}
												]
											}
										},
										"slots": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"label": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"description": "The FORM subfield type, such as `INPUT` or `SELECT`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. Null when the subfield takes any value.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"key",
													"label",
													"type",
													"required",
													"options"
												],
												"additionalProperties": false
											},
											"description": "The keyed FORM subfields of the form's document that a `FIELD` question can fill."
										},
										"publishIssues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string"
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														]
													},
													"message": {
														"type": "string",
														"description": "What the issue is and how to fix it, in English."
													},
													"userMessage": {
														"type": "string",
														"description": "The same text in Swedish, with the names of the parties and questions involved, for your users."
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "What stops the form from publishing (`BLOCKER`) or deserves a look (`WARNING`). Empty when the form is ready."
										},
										"statistics": {
											"type": "object",
											"properties": {
												"started": {
													"type": "number",
													"description": "Submissions started, in any status."
												},
												"signed": {
													"type": "number",
													"description": "Submissions whose document was signed."
												}
											},
											"required": [
												"started",
												"signed"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"templateId",
										"workspaceId",
										"sender",
										"respondentPartyId",
										"url",
										"enabled",
										"closedReason",
										"hasPassword",
										"name",
										"description",
										"thankYouMessage",
										"redirectUrl",
										"documentExpiresInDays",
										"expiresAt",
										"maxSubmissions",
										"submissionCount",
										"createdAt",
										"updatedAt",
										"questions",
										"slots",
										"publishIssues",
										"statistics"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"sender": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
									"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
									"enabled": true,
									"closedReason": null,
									"hasPassword": false,
									"name": "Intresseanmälan",
									"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
									"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
									"redirectUrl": null,
									"documentExpiresInDays": 30,
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"maxSubmissions": 100,
									"submissionCount": 12,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"questions": [
										{
											"id": "name",
											"kind": "NAME",
											"label": "Namn",
											"required": true
										},
										{
											"id": "email",
											"kind": "EMAIL",
											"label": "E-post",
											"required": true
										},
										{
											"id": "startdatum",
											"kind": "FIELD",
											"key": "startdatum",
											"label": "Önskat startdatum",
											"required": true
										}
									],
									"slots": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"type": "DATEPICKER",
											"required": true,
											"options": null
										}
									],
									"publishIssues": [],
									"statistics": {
										"started": 14,
										"signed": 12
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write, documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write",
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write",
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Permanently delete the form, its owned template and submission records. Documents created from submissions remain ordinary documents. Export responses before deleting.",
				"summary": "Delete a form",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteForm",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the form is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:delete"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/publish": {
			"post": {
				"description": "Validate readiness and publish or reopen the form. The authenticated user becomes the sender of future documents and must be allowed to create and send documents without approval. Plan, signing methods, expiry and capacity are checked. Requires forms:write and documents:write.",
				"summary": "Publish a form",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "publishForm",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"templateId": {
											"type": "string",
											"description": "The ID of the template the form owns. Its documents are created from it."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"sender": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member every document from the form is created and sent as."
										},
										"respondentPartyId": {
											"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
											"type": [
												"string",
												"null"
											]
										},
										"url": {
											"type": "string",
											"description": "The public form link."
										},
										"enabled": {
											"type": "boolean",
											"description": "True if the form is published."
										},
										"closedReason": {
											"description": "Why a published form stopped accepting submissions. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"INCOMPLETE",
												"MAX_SUBMISSIONS",
												"EXPIRED",
												"SENDER_LEFT",
												null
											]
										},
										"hasPassword": {
											"type": "boolean",
											"description": "True if the link requires a password."
										},
										"name": {
											"description": "Name of the form, shown as the heading of the public form page.",
											"type": [
												"string",
												"null"
											]
										},
										"description": {
											"description": "Introduction shown under the heading.",
											"type": [
												"string",
												"null"
											]
										},
										"thankYouMessage": {
											"description": "Message shown after the respondent submits.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL the respondent goes to after submitting.",
											"type": [
												"string",
												"null"
											]
										},
										"documentExpiresInDays": {
											"type": "number",
											"description": "Days each document created from a submission stays signable."
										},
										"expiresAt": {
											"description": "When the form closes to new submissions. Null keeps it open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"maxSubmissions": {
											"description": "Most submissions the form accepts. Null means no limit.",
											"type": [
												"number",
												"null"
											]
										},
										"submissionCount": {
											"type": "number",
											"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was last updated."
										},
										"questions": {
											"maxItems": 60,
											"type": "array",
											"items": {
												"oneOf": [
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"NAME"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"EMAIL"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PHONE"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"FIELD"
																]
															},
															"key": {
																"type": "string",
																"minLength": 1,
																"maxLength": 100
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"key"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"TEXT"
																]
															},
															"multiline": {
																"default": false,
																"type": "boolean"
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"multiline"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"HEADING"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PARAGRAPH"
																]
															},
															"text": {
																"type": "string",
																"maxLength": 4000
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													}
												]
											}
										},
										"slots": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"label": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"description": "The FORM subfield type, such as `INPUT` or `SELECT`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. Null when the subfield takes any value.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"key",
													"label",
													"type",
													"required",
													"options"
												],
												"additionalProperties": false
											},
											"description": "The keyed FORM subfields of the form's document that a `FIELD` question can fill."
										},
										"publishIssues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string"
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														]
													},
													"message": {
														"type": "string",
														"description": "What the issue is and how to fix it, in English."
													},
													"userMessage": {
														"type": "string",
														"description": "The same text in Swedish, with the names of the parties and questions involved, for your users."
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "What stops the form from publishing (`BLOCKER`) or deserves a look (`WARNING`). Empty when the form is ready."
										},
										"statistics": {
											"type": "object",
											"properties": {
												"started": {
													"type": "number",
													"description": "Submissions started, in any status."
												},
												"signed": {
													"type": "number",
													"description": "Submissions whose document was signed."
												}
											},
											"required": [
												"started",
												"signed"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"templateId",
										"workspaceId",
										"sender",
										"respondentPartyId",
										"url",
										"enabled",
										"closedReason",
										"hasPassword",
										"name",
										"description",
										"thankYouMessage",
										"redirectUrl",
										"documentExpiresInDays",
										"expiresAt",
										"maxSubmissions",
										"submissionCount",
										"createdAt",
										"updatedAt",
										"questions",
										"slots",
										"publishIssues",
										"statistics"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"sender": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
									"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
									"enabled": true,
									"closedReason": null,
									"hasPassword": false,
									"name": "Intresseanmälan",
									"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
									"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
									"redirectUrl": null,
									"documentExpiresInDays": 30,
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"maxSubmissions": 100,
									"submissionCount": 12,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"questions": [
										{
											"id": "name",
											"kind": "NAME",
											"label": "Namn",
											"required": true
										},
										{
											"id": "email",
											"kind": "EMAIL",
											"label": "E-post",
											"required": true
										},
										{
											"id": "startdatum",
											"kind": "FIELD",
											"key": "startdatum",
											"label": "Önskat startdatum",
											"required": true
										}
									],
									"slots": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"type": "DATEPICKER",
											"required": true,
											"options": null
										}
									],
									"publishIssues": [],
									"statistics": {
										"started": 14,
										"signed": 12
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write, documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write",
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write",
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/unpublish": {
			"post": {
				"description": "Stop new submissions and return the form. Republishing preserves the URL. Existing documents continue through signing.",
				"summary": "Unpublish a form",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "unpublishForm",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"templateId": {
											"type": "string",
											"description": "The ID of the template the form owns. Its documents are created from it."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"sender": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member every document from the form is created and sent as."
										},
										"respondentPartyId": {
											"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
											"type": [
												"string",
												"null"
											]
										},
										"url": {
											"type": "string",
											"description": "The public form link."
										},
										"enabled": {
											"type": "boolean",
											"description": "True if the form is published."
										},
										"closedReason": {
											"description": "Why a published form stopped accepting submissions. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"INCOMPLETE",
												"MAX_SUBMISSIONS",
												"EXPIRED",
												"SENDER_LEFT",
												null
											]
										},
										"hasPassword": {
											"type": "boolean",
											"description": "True if the link requires a password."
										},
										"name": {
											"description": "Name of the form, shown as the heading of the public form page.",
											"type": [
												"string",
												"null"
											]
										},
										"description": {
											"description": "Introduction shown under the heading.",
											"type": [
												"string",
												"null"
											]
										},
										"thankYouMessage": {
											"description": "Message shown after the respondent submits.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL the respondent goes to after submitting.",
											"type": [
												"string",
												"null"
											]
										},
										"documentExpiresInDays": {
											"type": "number",
											"description": "Days each document created from a submission stays signable."
										},
										"expiresAt": {
											"description": "When the form closes to new submissions. Null keeps it open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"maxSubmissions": {
											"description": "Most submissions the form accepts. Null means no limit.",
											"type": [
												"number",
												"null"
											]
										},
										"submissionCount": {
											"type": "number",
											"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was last updated."
										},
										"questions": {
											"maxItems": 60,
											"type": "array",
											"items": {
												"oneOf": [
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"NAME"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"EMAIL"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PHONE"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"FIELD"
																]
															},
															"key": {
																"type": "string",
																"minLength": 1,
																"maxLength": 100
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"key"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"TEXT"
																]
															},
															"multiline": {
																"default": false,
																"type": "boolean"
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"multiline"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"HEADING"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PARAGRAPH"
																]
															},
															"text": {
																"type": "string",
																"maxLength": 4000
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													}
												]
											}
										},
										"slots": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"label": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"description": "The FORM subfield type, such as `INPUT` or `SELECT`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. Null when the subfield takes any value.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"key",
													"label",
													"type",
													"required",
													"options"
												],
												"additionalProperties": false
											},
											"description": "The keyed FORM subfields of the form's document that a `FIELD` question can fill."
										},
										"publishIssues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string"
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														]
													},
													"message": {
														"type": "string",
														"description": "What the issue is and how to fix it, in English."
													},
													"userMessage": {
														"type": "string",
														"description": "The same text in Swedish, with the names of the parties and questions involved, for your users."
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "What stops the form from publishing (`BLOCKER`) or deserves a look (`WARNING`). Empty when the form is ready."
										},
										"statistics": {
											"type": "object",
											"properties": {
												"started": {
													"type": "number",
													"description": "Submissions started, in any status."
												},
												"signed": {
													"type": "number",
													"description": "Submissions whose document was signed."
												}
											},
											"required": [
												"started",
												"signed"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"templateId",
										"workspaceId",
										"sender",
										"respondentPartyId",
										"url",
										"enabled",
										"closedReason",
										"hasPassword",
										"name",
										"description",
										"thankYouMessage",
										"redirectUrl",
										"documentExpiresInDays",
										"expiresAt",
										"maxSubmissions",
										"submissionCount",
										"createdAt",
										"updatedAt",
										"questions",
										"slots",
										"publishIssues",
										"statistics"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"sender": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
									"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
									"enabled": true,
									"closedReason": null,
									"hasPassword": false,
									"name": "Intresseanmälan",
									"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
									"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
									"redirectUrl": null,
									"documentExpiresInDays": 30,
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"maxSubmissions": 100,
									"submissionCount": 12,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"questions": [
										{
											"id": "name",
											"kind": "NAME",
											"label": "Namn",
											"required": true
										},
										{
											"id": "email",
											"kind": "EMAIL",
											"label": "E-post",
											"required": true
										},
										{
											"id": "startdatum",
											"kind": "FIELD",
											"key": "startdatum",
											"label": "Önskat startdatum",
											"required": true
										}
									],
									"slots": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"type": "DATEPICKER",
											"required": true,
											"options": null
										}
									],
									"publishIssues": [],
									"statistics": {
										"started": 14,
										"signed": 12
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/rotate-token": {
			"post": {
				"description": "Invalidate the previous public URL and return the form with its new `url`. Existing signing links remain valid.",
				"summary": "Rotate a form link",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "rotateFormToken",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"templateId": {
											"type": "string",
											"description": "The ID of the template the form owns. Its documents are created from it."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"sender": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member every document from the form is created and sent as."
										},
										"respondentPartyId": {
											"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
											"type": [
												"string",
												"null"
											]
										},
										"url": {
											"type": "string",
											"description": "The public form link."
										},
										"enabled": {
											"type": "boolean",
											"description": "True if the form is published."
										},
										"closedReason": {
											"description": "Why a published form stopped accepting submissions. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"INCOMPLETE",
												"MAX_SUBMISSIONS",
												"EXPIRED",
												"SENDER_LEFT",
												null
											]
										},
										"hasPassword": {
											"type": "boolean",
											"description": "True if the link requires a password."
										},
										"name": {
											"description": "Name of the form, shown as the heading of the public form page.",
											"type": [
												"string",
												"null"
											]
										},
										"description": {
											"description": "Introduction shown under the heading.",
											"type": [
												"string",
												"null"
											]
										},
										"thankYouMessage": {
											"description": "Message shown after the respondent submits.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL the respondent goes to after submitting.",
											"type": [
												"string",
												"null"
											]
										},
										"documentExpiresInDays": {
											"type": "number",
											"description": "Days each document created from a submission stays signable."
										},
										"expiresAt": {
											"description": "When the form closes to new submissions. Null keeps it open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"maxSubmissions": {
											"description": "Most submissions the form accepts. Null means no limit.",
											"type": [
												"number",
												"null"
											]
										},
										"submissionCount": {
											"type": "number",
											"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was last updated."
										},
										"questions": {
											"maxItems": 60,
											"type": "array",
											"items": {
												"oneOf": [
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"NAME"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"EMAIL"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PHONE"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"FIELD"
																]
															},
															"key": {
																"type": "string",
																"minLength": 1,
																"maxLength": 100
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"key"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"TEXT"
																]
															},
															"multiline": {
																"default": false,
																"type": "boolean"
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"multiline"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"HEADING"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PARAGRAPH"
																]
															},
															"text": {
																"type": "string",
																"maxLength": 4000
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													}
												]
											}
										},
										"slots": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"label": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"description": "The FORM subfield type, such as `INPUT` or `SELECT`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. Null when the subfield takes any value.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"key",
													"label",
													"type",
													"required",
													"options"
												],
												"additionalProperties": false
											},
											"description": "The keyed FORM subfields of the form's document that a `FIELD` question can fill."
										},
										"publishIssues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string"
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														]
													},
													"message": {
														"type": "string",
														"description": "What the issue is and how to fix it, in English."
													},
													"userMessage": {
														"type": "string",
														"description": "The same text in Swedish, with the names of the parties and questions involved, for your users."
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "What stops the form from publishing (`BLOCKER`) or deserves a look (`WARNING`). Empty when the form is ready."
										},
										"statistics": {
											"type": "object",
											"properties": {
												"started": {
													"type": "number",
													"description": "Submissions started, in any status."
												},
												"signed": {
													"type": "number",
													"description": "Submissions whose document was signed."
												}
											},
											"required": [
												"started",
												"signed"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"templateId",
										"workspaceId",
										"sender",
										"respondentPartyId",
										"url",
										"enabled",
										"closedReason",
										"hasPassword",
										"name",
										"description",
										"thankYouMessage",
										"redirectUrl",
										"documentExpiresInDays",
										"expiresAt",
										"maxSubmissions",
										"submissionCount",
										"createdAt",
										"updatedAt",
										"questions",
										"slots",
										"publishIssues",
										"statistics"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"sender": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
									"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
									"enabled": true,
									"closedReason": null,
									"hasPassword": false,
									"name": "Intresseanmälan",
									"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
									"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
									"redirectUrl": null,
									"documentExpiresInDays": 30,
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"maxSubmissions": 100,
									"submissionCount": 12,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"questions": [
										{
											"id": "name",
											"kind": "NAME",
											"label": "Namn",
											"required": true
										},
										{
											"id": "email",
											"kind": "EMAIL",
											"label": "E-post",
											"required": true
										},
										{
											"id": "startdatum",
											"kind": "FIELD",
											"key": "startdatum",
											"label": "Önskat startdatum",
											"required": true
										}
									],
									"slots": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"type": "DATEPICKER",
											"required": true,
											"options": null
										}
									],
									"publishIssues": [],
									"statistics": {
										"started": 14,
										"signed": 12
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/respondent": {
			"put": {
				"description": "Choose an existing SIGNER from this form's template by its party ID. The visitor fills this party's slot. Invalid edits close a published form. Requires forms:write and documents:write, including for drafts.",
				"summary": "Select the respondent party",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "setFormRespondent",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"partyId": {
										"type": "string",
										"minLength": 1,
										"description": "The party ID."
									}
								},
								"required": [
									"partyId"
								],
								"additionalProperties": false
							},
							"example": {
								"partyId": "cm4k2x9p10004abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"templateId": {
											"type": "string",
											"description": "The ID of the template the form owns. Its documents are created from it."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"sender": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member every document from the form is created and sent as."
										},
										"respondentPartyId": {
											"description": "The ID of the template party the respondent becomes. Null on a draft without one.",
											"type": [
												"string",
												"null"
											]
										},
										"url": {
											"type": "string",
											"description": "The public form link."
										},
										"enabled": {
											"type": "boolean",
											"description": "True if the form is published."
										},
										"closedReason": {
											"description": "Why a published form stopped accepting submissions. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"INCOMPLETE",
												"MAX_SUBMISSIONS",
												"EXPIRED",
												"SENDER_LEFT",
												null
											]
										},
										"hasPassword": {
											"type": "boolean",
											"description": "True if the link requires a password."
										},
										"name": {
											"description": "Name of the form, shown as the heading of the public form page.",
											"type": [
												"string",
												"null"
											]
										},
										"description": {
											"description": "Introduction shown under the heading.",
											"type": [
												"string",
												"null"
											]
										},
										"thankYouMessage": {
											"description": "Message shown after the respondent submits.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL the respondent goes to after submitting.",
											"type": [
												"string",
												"null"
											]
										},
										"documentExpiresInDays": {
											"type": "number",
											"description": "Days each document created from a submission stays signable."
										},
										"expiresAt": {
											"description": "When the form closes to new submissions. Null keeps it open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"maxSubmissions": {
											"description": "Most submissions the form accepts. Null means no limit.",
											"type": [
												"number",
												"null"
											]
										},
										"submissionCount": {
											"type": "number",
											"description": "Active starts plus submitted responses, counted against `maxSubmissions`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form was last updated."
										},
										"questions": {
											"maxItems": 60,
											"type": "array",
											"items": {
												"oneOf": [
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"NAME"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"EMAIL"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PHONE"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"FIELD"
																]
															},
															"key": {
																"type": "string",
																"minLength": 1,
																"maxLength": 100
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"key"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"TEXT"
																]
															},
															"multiline": {
																"default": false,
																"type": "boolean"
															}
														},
														"required": [
															"id",
															"required",
															"kind",
															"multiline"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"HEADING"
																]
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													},
													{
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"minLength": 1,
																"maxLength": 40,
																"description": "The form ID."
															},
															"label": {
																"type": "string",
																"maxLength": 200
															},
															"placeholder": {
																"type": "string",
																"maxLength": 200
															},
															"description": {
																"type": "string",
																"maxLength": 1000
															},
															"width": {
																"type": "string",
																"enum": [
																	"FULL",
																	"HALF"
																]
															},
															"required": {
																"default": true,
																"type": "boolean"
															},
															"kind": {
																"type": "string",
																"enum": [
																	"PARAGRAPH"
																]
															},
															"text": {
																"type": "string",
																"maxLength": 4000
															}
														},
														"required": [
															"id",
															"required",
															"kind"
														],
														"additionalProperties": false
													}
												]
											}
										},
										"slots": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"label": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"description": "The FORM subfield type, such as `INPUT` or `SELECT`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. Null when the subfield takes any value.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													}
												},
												"required": [
													"key",
													"label",
													"type",
													"required",
													"options"
												],
												"additionalProperties": false
											},
											"description": "The keyed FORM subfields of the form's document that a `FIELD` question can fill."
										},
										"publishIssues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string"
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														]
													},
													"message": {
														"type": "string",
														"description": "What the issue is and how to fix it, in English."
													},
													"userMessage": {
														"type": "string",
														"description": "The same text in Swedish, with the names of the parties and questions involved, for your users."
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "What stops the form from publishing (`BLOCKER`) or deserves a look (`WARNING`). Empty when the form is ready."
										},
										"statistics": {
											"type": "object",
											"properties": {
												"started": {
													"type": "number",
													"description": "Submissions started, in any status."
												},
												"signed": {
													"type": "number",
													"description": "Submissions whose document was signed."
												}
											},
											"required": [
												"started",
												"signed"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"templateId",
										"workspaceId",
										"sender",
										"respondentPartyId",
										"url",
										"enabled",
										"closedReason",
										"hasPassword",
										"name",
										"description",
										"thankYouMessage",
										"redirectUrl",
										"documentExpiresInDays",
										"expiresAt",
										"maxSubmissions",
										"submissionCount",
										"createdAt",
										"updatedAt",
										"questions",
										"slots",
										"publishIssues",
										"statistics"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"sender": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"respondentPartyId": "cm4k2x9p10035abcd1234efgh",
									"url": "https://app.sajn.se/f/Xk9mQ2vR7tLp4wZs8nYb3",
									"enabled": true,
									"closedReason": null,
									"hasPassword": false,
									"name": "Intresseanmälan",
									"description": "Anmäl ditt intresse för en tjänst hos Exempelbolaget AB.",
									"thankYouMessage": "Tack! Vi återkommer inom två arbetsdagar.",
									"redirectUrl": null,
									"documentExpiresInDays": 30,
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"maxSubmissions": 100,
									"submissionCount": 12,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"questions": [
										{
											"id": "name",
											"kind": "NAME",
											"label": "Namn",
											"required": true
										},
										{
											"id": "email",
											"kind": "EMAIL",
											"label": "E-post",
											"required": true
										},
										{
											"id": "startdatum",
											"kind": "FIELD",
											"key": "startdatum",
											"label": "Önskat startdatum",
											"required": true
										}
									],
									"slots": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"type": "DATEPICKER",
											"required": true,
											"options": null
										}
									],
									"publishIssues": [],
									"statistics": {
										"started": 14,
										"signed": 12
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "partyId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write, documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write",
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write",
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/template": {
			"get": {
				"description": "Read the template the form owns: its name, settings, fields and parties. Every document created from a submission is created from it. Field and party IDs belong to this form, not to the template it was copied from.",
				"summary": "Get the form's template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFormTemplate",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"name": {
											"type": "string"
										},
										"templateMeta": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"content": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											},
											"description": "Fields in position order"
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"id",
										"name",
										"templateMeta",
										"content",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"name": "Intresseanmälan",
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10023abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:read"
						]
					}
				]
			},
			"patch": {
				"description": "Change the template's name, signing order and document defaults, and return the template. Settings you omit stay unchanged. Changes apply to future submissions only. Requires forms:write and documents:write, including for drafts.",
				"summary": "Update the form's template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateFormTemplate",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"description": "Template name/title",
										"type": "string",
										"minLength": 1
									},
									"templateMeta": {
										"type": "object",
										"properties": {
											"signingMode": {
												"type": "string",
												"enum": [
													"PARALLEL",
													"SEQUENTIAL"
												]
											},
											"forceReadFullDocument": {
												"type": "boolean"
											},
											"showChatToSigners": {
												"type": "boolean"
											},
											"value": {
												"type": [
													"string",
													"null"
												]
											},
											"signableAfterExpired": {
												"type": "boolean"
											},
											"sendPlainTextEmailOnly": {
												"type": "boolean"
											},
											"allowDelegation": {
												"type": "boolean"
											},
											"responsibleUserId": {
												"type": "string",
												"description": "The user ID."
											},
											"internalRecipients": {
												"description": "Email addresses that receive a copy of the sealed PDF once the document is completed (max 5). Pass an empty array to clear.",
												"maxItems": 5,
												"type": "array",
												"items": {
													"type": "string",
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
												}
											},
											"visibility": {
												"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
												"type": "string",
												"enum": [
													"EVERYONE",
													"RESPONSIBLE",
													"PERMISSION",
													"USER_SPECIFIC"
												]
											},
											"selectedUserIds": {
												"description": "User IDs granted access when visibility is USER_SPECIFIC",
												"type": "array",
												"items": {
													"type": "string"
												}
											},
											"language": {
												"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
												"type": "string",
												"enum": [
													"sv",
													"en",
													"no",
													"da",
													"fi",
													"de",
													"is",
													"es",
													"fr",
													"it"
												]
											},
											"reminderIntervalDays": {
												"description": "Days between automatic reminders. Pass `0` to turn them off, or null to use the default of 3.",
												"type": [
													"integer",
													"null"
												],
												"minimum": 0,
												"maximum": 9007199254740991
											},
											"openVerification": {
												"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"PIN",
													"SMS",
													"EMAIL",
													"SE_BANKID",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													null
												]
											},
											"nationalIdDisplayMode": {
												"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"FULL",
													"PARTIAL",
													"NONE",
													null
												]
											},
											"sameDeviceSigning": {
												"description": "Whether all parties sign in sequence on one device",
												"type": "boolean"
											},
											"documentCategoryId": {
												"description": "Document category (Dokumenttyp) ID. See GET /api/v1/document-categories.",
												"type": [
													"string",
													"null"
												]
											}
										},
										"additionalProperties": false
									}
								},
								"additionalProperties": false
							},
							"example": {
								"name": "Intresseanmälan",
								"templateMeta": {
									"signingMode": "PARALLEL",
									"forceReadFullDocument": false,
									"showChatToSigners": false,
									"value": "540000",
									"signableAfterExpired": false,
									"sendPlainTextEmailOnly": false,
									"allowDelegation": false,
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"internalRecipients": [
										"hr@example.com"
									],
									"visibility": "EVERYONE",
									"selectedUserIds": [
										"cm4k2x9p10023abcd1234efgh"
									],
									"language": "sv",
									"reminderIntervalDays": 3,
									"openVerification": "PIN",
									"nationalIdDisplayMode": "FULL",
									"sameDeviceSigning": false,
									"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form ID."
										},
										"name": {
											"type": "string"
										},
										"templateMeta": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"content": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											},
											"description": "Fields in position order"
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"id",
										"name",
										"templateMeta",
										"content",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10023abcd1234efgh",
									"name": "Intresseanmälan",
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10023abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write, documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write",
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "form"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write",
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/template/content": {
			"put": {
				"description": "Replace the complete ordered list of content blocks, and return the template. Include existing IDs to keep blocks; omit an ID to create a block. Blocks you leave out are deleted. An existing block's type can't change. PDF ownership, metadata, section locks, and boxes placed on a PDF are validated. Read the form again to see the keys a question can bind to. Requires forms:write and documents:write, including for drafts.",
				"summary": "Replace the form template's content",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "setFormTemplateContent",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"content": {
										"maxItems": 500,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"minLength": 1,
													"description": "The content block ID."
												},
												"type": {
													"type": "string",
													"enum": [
														"TEXT",
														"HTML",
														"FORM",
														"PDF",
														"PRODUCT_TABLE",
														"TABLE",
														"SPACER",
														"PAGE_BREAK",
														"DURATION"
													]
												},
												"position": {
													"type": "integer",
													"minimum": 0,
													"maximum": 9007199254740991
												},
												"fieldMeta": {
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			},
																			"unit": {
																				"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																				"type": "string",
																				"enum": [
																					"RELATIVE",
																					"POINTS"
																				]
																			},
																			"origin": {
																				"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																				"type": "string",
																				"enum": [
																					"TOP_LEFT",
																					"BOTTOM_LEFT"
																				]
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		]
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind",
																					"inputType"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind"
																				]
																			}
																		],
																		"description": "A box placed on a page of a PDF field"
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						]
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				}
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		]
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	]
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	]
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	]
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	]
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	}
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				]
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		]
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					]
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		]
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																}
															},
															"required": [
																"type"
															]
														}
													]
												}
											},
											"required": [
												"type",
												"position",
												"fieldMeta"
											]
										}
									}
								},
								"required": [
									"content"
								],
								"additionalProperties": false
							},
							"example": {
								"content": [
									{
										"id": "cm4k2x9p10009abcd1234efgh",
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>",
											"locked": false,
											"sectionStyle": {
												"background": "NONE",
												"padding": "NONE",
												"bleed": false,
												"border": false
											},
											"hidden": false
										}
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The content block ID."
										},
										"name": {
											"type": "string"
										},
										"templateMeta": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"content": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											},
											"description": "Fields in position order"
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"id",
										"name",
										"templateMeta",
										"content",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"name": "Anställningsvillkor",
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10009abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected array, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "content",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected array, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write, documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write",
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write",
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/template/parties": {
			"put": {
				"description": "Replace the complete party list, and return the template. Include IDs to keep parties; omit IDs to create them. Properties you omit on a kept party, including its PIN, stay unchanged, and null clears a nullable property. Parties you leave out are deleted. If you remove the respondent, select another SIGNER before publishing. Existing submissions are unchanged. Requires forms:write and documents:write, including for drafts.",
				"summary": "Replace the form template's parties",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "setFormTemplateParties",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"parties": {
										"minItems": 1,
										"maxItems": 100,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"name": {
													"type": "string",
													"minLength": 1,
													"maxLength": 200
												},
												"email": {
													"type": [
														"string",
														"null"
													],
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
												},
												"phone": {
													"type": [
														"string",
														"null"
													]
												},
												"company": {
													"description": "The company the party signs for. A key you leave out keeps its value. Pass null to clear every company field.",
													"type": [
														"object",
														"null"
													],
													"properties": {
														"id": {
															"description": "ID of a company in your workspace to link. Pass null to unlink it.",
															"type": [
																"string",
																"null"
															]
														},
														"name": {
															"description": "Company name. Pass null to clear it.",
															"type": [
																"string",
																"null"
															]
														},
														"orgNumber": {
															"description": "Company organization number. Pass null to clear it.",
															"type": [
																"string",
																"null"
															]
														},
														"role": {
															"description": "The party's role or title at the company. Pass null to clear it.",
															"type": [
																"string",
																"null"
															]
														}
													}
												},
												"externalId": {
													"type": [
														"string",
														"null"
													]
												},
												"nationalId": {
													"type": [
														"string",
														"null"
													]
												},
												"country": {
													"type": [
														"string",
														"null"
													],
													"description": "ISO 3166-1 alpha-2 country code of the party, such as SE or DE"
												},
												"role": {
													"type": "string",
													"enum": [
														"SIGNER",
														"ORGANIZER",
														"REVIEWER"
													],
													"description": "Party role: SIGNER, ORGANIZER, or REVIEWER."
												},
												"signingOrder": {
													"type": [
														"number",
														"null"
													]
												},
												"delivery": {
													"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
													"type": "array",
													"items": {
														"type": "string",
														"enum": [
															"EMAIL",
															"SMS",
															"IN_APP"
														]
													}
												},
												"signatureMethod": {
													"anyOf": [
														{
															"type": [
																"string",
																"null"
															],
															"enum": [
																"NONE",
																"DRAWING",
																"SE_BANKID",
																"MANUAL",
																"CLICK_TO_SIGN",
																"NO_BANKID_BIOMETRIC",
																"NO_BANKID_HIGH",
																"NO_QES",
																"DK_MITID",
																"DK_MITID_ERHVERV",
																"FI_FTN",
																"NL_IDIN",
																"ZEALID_QES",
																null
															]
														},
														{
															"type": "null"
														}
													]
												},
												"signVerification": {
													"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"id": {
													"type": "string",
													"minLength": 1,
													"description": "The party ID."
												},
												"contactId": {
													"description": "The contact ID.",
													"type": [
														"string",
														"null"
													],
													"minLength": 1
												},
												"type": {
													"type": "string",
													"enum": [
														"INDIVIDUAL",
														"COMPANY"
													]
												},
												"signPin": {
													"type": [
														"string",
														"null"
													],
													"minLength": 4,
													"maxLength": 100
												}
											},
											"required": [
												"name"
											],
											"additionalProperties": false
										}
									}
								},
								"required": [
									"parties"
								],
								"additionalProperties": false
							},
							"example": {
								"parties": [
									{
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"phone": "+46701740605",
										"company": null,
										"externalId": "HR-2026-0142",
										"nationalId": "191212121212",
										"country": "SE",
										"role": "SIGNER",
										"signingOrder": 1,
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": "PIN",
										"id": "cm4k2x9p10004abcd1234efgh",
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"type": "INDIVIDUAL",
										"signPin": "4821"
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The party ID."
										},
										"name": {
											"type": "string"
										},
										"templateMeta": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"content": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											},
											"description": "Fields in position order"
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"id",
										"name",
										"templateMeta",
										"content",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"name": "Kai Lindqvist",
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10004abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected array, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "parties",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected array, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:write, documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:write",
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:write",
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/submissions": {
			"get": {
				"description": "Read answers and respondent contact details, most recently started first. To sync responses, set updatedAfter, sort by updatedAt ascending, and pass nextCursor as cursor until hasMore is false. Use submittedAfter to filter submitted responses. documentId links to the ordinary document API, which separately enforces document access.",
				"summary": "List form submissions",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "status",
						"in": "query",
						"description": "Returns only submissions with one of these statuses. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"STARTED",
									"SUBMITTED",
									"COMPLETED",
									"EXPIRED"
								]
							}
						}
					},
					{
						"name": "submittedAfter",
						"in": "query",
						"description": "Only submissions submitted at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "submittedBefore",
						"in": "query",
						"description": "Only submissions submitted at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only submissions updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only submissions updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "orderBy",
						"in": "query",
						"description": "The field to sort by. Default: `startedAt`.",
						"schema": {
							"default": "startedAt",
							"type": "string",
							"enum": [
								"startedAt",
								"updatedAt"
							]
						}
					},
					{
						"name": "orderDirection",
						"in": "query",
						"description": "The sort direction. Default: `desc`.",
						"schema": {
							"default": "desc",
							"type": "string",
							"enum": [
								"asc",
								"desc"
							]
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFormSubmissions",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The form submission ID."
													},
													"formId": {
														"type": "string",
														"description": "The form ID."
													},
													"status": {
														"type": "string",
														"enum": [
															"STARTED",
															"SUBMITTED",
															"COMPLETED",
															"EXPIRED"
														]
													},
													"respondentName": {
														"type": [
															"string",
															"null"
														]
													},
													"respondentEmail": {
														"type": [
															"string",
															"null"
														]
													},
													"respondentPhone": {
														"type": [
															"string",
															"null"
														]
													},
													"answers": {
														"description": "The respondent's answers, keyed by field key. Null until the respondent submits.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {}
													},
													"documentId": {
														"description": "The ID of the document created from the submission. Null until one exists.",
														"type": [
															"string",
															"null"
														]
													},
													"startedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the respondent opened the form."
													},
													"submittedAt": {
														"description": "When the respondent submitted. Null until then.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the form submission was last updated."
													}
												},
												"required": [
													"id",
													"formId",
													"status",
													"respondentName",
													"respondentEmail",
													"respondentPhone",
													"answers",
													"documentId",
													"startedAt",
													"submittedAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10024abcd1234efgh",
											"formId": "cm4k2x9p10023abcd1234efgh",
											"status": "SUBMITTED",
											"respondentName": "Kai Lindqvist",
											"respondentEmail": "kai@example.com",
											"respondentPhone": "+46701740605",
											"answers": {
												"namn": "Kai Lindqvist",
												"epost": "kai@example.com",
												"startdatum": "2026-11-01"
											},
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"startedAt": "2026-09-28T09:12:00.000Z",
											"submittedAt": "2026-09-28T09:15:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:submissions:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:submissions:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form submission not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "submission"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:submissions:read"
						]
					}
				]
			}
		},
		"/api/v1/forms/{id}/submissions/{submissionId}": {
			"get": {
				"description": "Read one submission's answers, contact details, status and document ID. Requires forms:submissions:read. IP addresses, user agents and signing tokens are never returned.",
				"summary": "Get a form submission",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form ID.",
						"example": "cm4k2x9p10023abcd1234efgh"
					},
					{
						"name": "submissionId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The form submission ID.",
						"example": "cm4k2x9p10024abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFormSubmission",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The form submission ID."
										},
										"formId": {
											"type": "string",
											"description": "The form ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"STARTED",
												"SUBMITTED",
												"COMPLETED",
												"EXPIRED"
											]
										},
										"respondentName": {
											"type": [
												"string",
												"null"
											]
										},
										"respondentEmail": {
											"type": [
												"string",
												"null"
											]
										},
										"respondentPhone": {
											"type": [
												"string",
												"null"
											]
										},
										"answers": {
											"description": "The respondent's answers, keyed by field key. Null until the respondent submits.",
											"type": [
												"object",
												"null"
											],
											"additionalProperties": {}
										},
										"documentId": {
											"description": "The ID of the document created from the submission. Null until one exists.",
											"type": [
												"string",
												"null"
											]
										},
										"startedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the respondent opened the form."
										},
										"submittedAt": {
											"description": "When the respondent submitted. Null until then.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the form submission was last updated."
										}
									},
									"required": [
										"id",
										"formId",
										"status",
										"respondentName",
										"respondentEmail",
										"respondentPhone",
										"answers",
										"documentId",
										"startedAt",
										"submittedAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10024abcd1234efgh",
									"formId": "cm4k2x9p10023abcd1234efgh",
									"status": "SUBMITTED",
									"respondentName": "Kai Lindqvist",
									"respondentEmail": "kai@example.com",
									"respondentPhone": "+46701740605",
									"answers": {
										"namn": "Kai Lindqvist",
										"epost": "kai@example.com",
										"startdatum": "2026-11-01"
									},
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"startedAt": "2026-09-28T09:12:00.000Z",
									"submittedAt": "2026-09-28T09:15:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires forms:submissions:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"forms:submissions:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Form submission not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "submission"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"forms:submissions:read"
						]
					}
				]
			}
		},
		"/api/v1/health": {
			"get": {
				"description": "Check API health status and get version information. This endpoint does not require authentication.",
				"summary": "Health check",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					}
				],
				"operationId": "root",
				"responses": {
					"200": {
						"description": "Health check response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"status": {
											"type": "string",
											"description": "API status",
											"enum": [
												"ok"
											]
										},
										"timestamp": {
											"description": "Current server timestamp",
											"type": "string",
											"format": "date-time"
										},
										"version": {
											"type": "string",
											"description": "API version number"
										}
									},
									"required": [
										"status",
										"timestamp",
										"version"
									],
									"additionalProperties": false,
									"description": "Health check response"
								},
								"example": {
									"status": "ok",
									"timestamp": "2026-09-28T09:15:00.000Z",
									"version": "2026-10"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							}
						}
					}
				},
				"security": []
			}
		},
		"/api/v1/documents": {
			"get": {
				"description": "Retrieve a paginated list of all documents in your workspace.\n\nDocuments can be filtered and sorted. The response includes basic document information and metadata. Use the 'getDocument' endpoint to retrieve full document details including parties and fields.\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false. Pages are keyset-based on every `orderBy`, so they stay stable while documents change. Documents without a `completedAt` or `expiresAt` come last when you sort by that field.\n\n**Incremental sync:** Filter with `updatedAfter` set to the newest `updatedAt` you have stored, sort by `updatedAt` ascending, and follow the cursor until `hasMore` is false.",
				"summary": "List all documents",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "status",
						"in": "query",
						"description": "Filter by document status. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"DRAFT",
									"PENDING_APPROVAL",
									"PENDING",
									"COMPLETED",
									"EXPIRED",
									"CANCELLED",
									"REJECTED",
									"IMPORTED"
								]
							}
						}
					},
					{
						"name": "tagId",
						"in": "query",
						"description": "Filter by one or more tag IDs. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "folderId",
						"in": "query",
						"description": "Filter by folder ID. Pass `root` to include only top-level documents.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "templateId",
						"in": "query",
						"description": "Filter by the IDs of the templates the documents were created from. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "bundleId",
						"in": "query",
						"description": "Returns only the documents in this bundle. `folderId` is ignored with it.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "externalId",
						"in": "query",
						"description": "Returns only the document whose `externalId` equals this value exactly. For partial matches, use `query`.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "responsibleUserId",
						"in": "query",
						"description": "Filter by responsible user IDs. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only documents created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only documents created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only documents updated at or after this ISO 8601 date or date-time. Use this for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only documents updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "completedAfter",
						"in": "query",
						"description": "Only documents completed at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "completedBefore",
						"in": "query",
						"description": "Only documents completed at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "query",
						"in": "query",
						"description": "Free-text search across name, externalId, signer name, and signer email",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "archived",
						"in": "query",
						"description": "If `true`, returns only archived documents. If `false`, returns only documents that aren't archived. Default: `false`.",
						"schema": {
							"type": "boolean"
						}
					},
					{
						"name": "orderBy",
						"in": "query",
						"description": "The field to sort by. Default: `createdAt`.",
						"schema": {
							"default": "createdAt",
							"type": "string",
							"enum": [
								"createdAt",
								"updatedAt",
								"name",
								"completedAt",
								"expiresAt"
							]
						}
					},
					{
						"name": "orderDirection",
						"in": "query",
						"description": "The sort direction. Default: `desc`.",
						"schema": {
							"default": "desc",
							"type": "string",
							"enum": [
								"asc",
								"desc"
							]
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocuments",
				"responses": {
					"200": {
						"description": "Paginated list of documents",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique document identifier"
													},
													"externalId": {
														"description": "Your external reference ID for this document",
														"type": [
															"string",
															"null"
														]
													},
													"expiresAt": {
														"description": "Date and time when the document expires",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"name": {
														"type": "string",
														"description": "Document name/title"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														],
														"description": "Document status"
													},
													"documentMeta": {
														"description": "Document metadata including subject, message, signing order, etc.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"subject": {
																"description": "Email subject line when sending document",
																"type": [
																	"string",
																	"null"
																]
															},
															"message": {
																"description": "Custom message included in signing invitation",
																"type": [
																	"string",
																	"null"
																]
															},
															"signingMode": {
																"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"PARALLEL",
																	"SEQUENTIAL",
																	null
																]
															},
															"forceReadFullDocument": {
																"description": "Whether signers must read the entire document before signing",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"showChatToSigners": {
																"description": "Whether to show document chat to signers",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"language": {
																"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"sv",
																	"en",
																	"no",
																	"da",
																	"fi",
																	"de",
																	"is",
																	"es",
																	"fr",
																	"it",
																	null
																]
															},
															"value": {
																"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
																"type": [
																	"string",
																	"null"
																]
															},
															"redirectUrl": {
																"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
																"type": [
																	"string",
																	"null"
																]
															},
															"redirectEnabled": {
																"description": "Whether redirect after signing is enabled",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"internalRecipients": {
																"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
																"type": [
																	"array",
																	"null"
																],
																"items": {
																	"type": "string"
																}
															},
															"signableAfterExpired": {
																"description": "Whether the document remains signable after its expiration date",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"sendPlainTextEmailOnly": {
																"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"reminderIntervalDays": {
																"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
																"type": [
																	"integer",
																	"null"
																],
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															},
															"allowDelegation": {
																"description": "Whether signers may delegate signing to another person",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"openVerification": {
																"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"PIN",
																	"SMS",
																	"EMAIL",
																	"SE_BANKID",
																	"NO_BANKID_BIOMETRIC",
																	"NO_BANKID_HIGH",
																	"DK_MITID",
																	"DK_MITID_ERHVERV",
																	"FI_FTN",
																	"NL_IDIN",
																	null
																]
															},
															"aiChatEnabled": {
																"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"nationalIdDisplayMode": {
																"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"FULL",
																	"PARTIAL",
																	"NONE",
																	null
																]
															},
															"sameDeviceSigning": {
																"description": "Whether all parties sign in sequence on one device",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"documentCategoryId": {
																"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"subject",
															"message",
															"signingMode",
															"forceReadFullDocument",
															"showChatToSigners",
															"language",
															"value",
															"redirectUrl",
															"redirectEnabled",
															"internalRecipients",
															"signableAfterExpired",
															"sendPlainTextEmailOnly",
															"reminderIntervalDays",
															"allowDelegation",
															"openVerification",
															"aiChatEnabled",
															"nationalIdDisplayMode",
															"sameDeviceSigning",
															"documentCategoryId"
														],
														"additionalProperties": false
													},
													"createdAt": {
														"description": "Date and time when the document was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the document was last updated",
														"type": "string",
														"format": "date-time"
													},
													"completedAt": {
														"description": "Date and time when all signers completed signing",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"deletedAt": {
														"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"templateId": {
														"description": "ID of the template the document was created from, or null",
														"type": [
															"string",
															"null"
														]
													},
													"folderId": {
														"description": "ID of the folder that holds the document, or null at the top level",
														"type": [
															"string",
															"null"
														]
													},
													"responsibleUserId": {
														"description": "ID of the workspace member responsible for the document",
														"type": [
															"string",
															"null"
														]
													},
													"parties": {
														"description": "The document's parties, with who has signed. For every party property, call `GET /api/v1/documents/:id`.",
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID"
																},
																"name": {
																	"type": "string",
																	"description": "Signer full name"
																},
																"email": {
																	"description": "Signer email address",
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	],
																	"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	],
																	"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
																},
																"signedAt": {
																	"description": "Date and time when the signer signed (null if not signed)",
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													},
													"tags": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The tag ID."
																},
																"name": {
																	"type": "string"
																},
																"color": {
																	"type": "string"
																}
															},
															"required": [
																"id",
																"name",
																"color"
															],
															"additionalProperties": false
														},
														"description": "Tags applied to the document"
													}
												},
												"required": [
													"id",
													"externalId",
													"expiresAt",
													"name",
													"status",
													"documentMeta",
													"createdAt",
													"updatedAt",
													"completedAt",
													"deletedAt",
													"templateId",
													"folderId",
													"responsibleUserId",
													"parties",
													"tags"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Paginated list of documents"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"externalId": "HR-2026-0142",
											"expiresAt": "2026-10-28T22:00:00.000Z",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "COMPLETED",
											"documentMeta": {
												"subject": "Ditt anställningsavtal från Exempelbolaget AB",
												"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
												"signingMode": "PARALLEL",
												"forceReadFullDocument": false,
												"showChatToSigners": false,
												"language": "sv",
												"value": "540000",
												"redirectUrl": null,
												"redirectEnabled": true,
												"internalRecipients": [
													"hr@example.com"
												],
												"signableAfterExpired": false,
												"sendPlainTextEmailOnly": false,
												"reminderIntervalDays": 3,
												"allowDelegation": false,
												"openVerification": "PIN",
												"aiChatEnabled": false,
												"nationalIdDisplayMode": "FULL",
												"sameDeviceSigning": false,
												"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"completedAt": "2026-09-29T07:41:00.000Z",
											"deletedAt": null,
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"folderId": "cm4k2x9p10011abcd1234efgh",
											"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "SIGNED",
													"signedAt": "2026-09-29T07:41:00.000Z"
												}
											],
											"tags": [
												{
													"id": "cm4k2x9p10010abcd1234efgh",
													"name": "Anställning",
													"color": "#16A34A"
												}
											]
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new document in DRAFT status. You can optionally include parties, metadata, and responsible user during creation.\n\n**Document Types:**\n- `SIGNABLE` (default) - Standard signing document\n- `ACCEPTABLE` - Document that requires acceptance rather than signature\n- `ARCHIVE_IMPORTED` - Imported from external archive\n\n**Template Support:** Use `templateId` to create a document from a template. The template's fields and parties are copied. If you also send `parties`, they replace the template's parties, and signature and initials boxes placed on the PDF for the template's parties are removed.\n\n**CRM Link:** Use `integrationLink` to link the document to a CRM record (currently HubSpot deals). When the workspace has a field mapping configured for the integration, mapped custom fields and product-table rows are prefilled from the record, and signing status is written back to it. Explicit `customFields` in the request take precedence over prefilled values.\n\n**Responsible User:** Use `responsibleUserId` to assign a specific team member as responsible for the document. Defaults to the creating user if not specified.\n\n**Adding Parties:** Two approaches are supported:\n1. **Contact-based** (recommended): Provide `contactId` to reference existing contacts - automatically inherits all contact details\n2. **Manual**: Provide `name` and `email` to manually specify party details\n\n**Party Examples:**\n```json\n{\n  \"parties\": [\n    {\n      \"contactId\": \"contact-123\",\n      \"role\": \"SIGNER\",\n      \"signingOrder\": 1,\n      \"delivery\": [\"EMAIL\"],\n      \"signatureMethod\": \"SE_BANKID\"\n    },\n    {\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\",\n      \"role\": \"SIGNER\",\n      \"signingOrder\": 2,\n      \"delivery\": [\"SMS\"],\n      \"signatureMethod\": \"DRAWING\"\n    }\n  ]\n}\n```\n\n**Per-Party Settings:**\n- `delivery` - How the party gets the invitation: `[\"EMAIL\"]` (default), `[\"SMS\"]`, `[\"IN_APP\"]` to sign in person on your device, or `[]` to send nothing and share the signing URL yourself\n- `signatureMethod` - How the party signs: `DRAWING`, `SE_BANKID` (Swedish BankID), `CLICK_TO_SIGN`, `MANUAL`, or a national eID scheme. eID schemes are switched on market by market, so call `GET /api/v1/helpers/signature-methods` for the set your account can use\n- `signVerification` - Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null (default) means none. Call `GET /api/v1/helpers/two-step-verifications` for the live list\n\n**Complete Workflow with Templates:**\n\n1. **Create a template** in the dashboard, and give each value you fill in a key, such as \"name\" or \"phone\".\n2. **Create, fill in, and send in one request** (this endpoint): send `templateId`, the `parties`, the values in `fieldValues`, and `send: true`. If the template has signature boxes placed for its parties, fill those parties in with `templatePartyId` so the boxes stay. To list a template's keys, create a draft and call `GET /api/v1/documents/{docId}/field-values`.\n3. **Show the document in your app**, if you embed signing: create an embed session with `POST /api/v1/embed-sessions` for the party's ID. Find the party in the response by the `ref` you gave it.\n\nEach party has its own `delivery` and `signatureMethod`. A party with `delivery: []` gets no invitation.\n\n**Example:**\n```json\nPOST /api/v1/documents\n{\n  \"name\": \"Employment Contract\",\n  \"templateId\": \"template-id-with-form-fields\",\n  \"parties\": [\n    {\n      \"templatePartyId\": \"template-party-id\",\n      \"ref\": \"employee\",\n      \"name\": \"Alex Andersson\",\n      \"email\": \"alex@example.com\",\n      \"role\": \"SIGNER\",\n      \"delivery\": [],\n      \"signatureMethod\": \"SE_BANKID\"\n    }\n  ],\n  \"fieldValues\": [\n    {\"key\": \"name\", \"value\": \"Alex Andersson\"},\n    {\"key\": \"phone\", \"value\": \"+46700000000\"}\n  ],\n  \"send\": true\n}\n```\n\nTo fill in values or add parties after creation, use `PATCH /api/v1/documents/{docId}/field-values` and `POST /api/v1/documents/{docId}/parties`, then send with `POST /api/v1/documents/{docId}/send`.\n\n**Response:** Returns the created document in the same shape as `GET /api/v1/documents/{id}`, without `fields`. Each party carries the `ref` you gave it. To get a party's signing URL, call `GET /api/v1/documents/{id}/parties/{partyId}`.",
				"summary": "Create a new document",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"description": "Document name/title"
									},
									"externalId": {
										"description": "Your external reference ID for tracking this document",
										"type": [
											"string",
											"null"
										]
									},
									"expiresAt": {
										"description": "Expiration date for the document",
										"type": [
											"string",
											"null"
										],
										"format": "date-time"
									},
									"type": {
										"description": "Document type: SIGNABLE (default), ACCEPTABLE, or ARCHIVE_IMPORTED",
										"type": "string",
										"enum": [
											"SIGNABLE",
											"ACCEPTABLE",
											"ARCHIVE_IMPORTED"
										]
									},
									"templateId": {
										"description": "Template ID to create document from. The template's fields and parties are copied. If you also send `parties`, they replace the template's parties, and signature and initials boxes placed for the template's parties are removed, unless a party names a `templatePartyId`: then the template's parties and their boxes are kept, and the parties you send fill them in or are added.",
										"type": [
											"string",
											"null"
										]
									},
									"responsibleUserId": {
										"description": "User ID of the person responsible for this document. Must be a member of your organization. Defaults to the creating user.",
										"type": "string"
									},
									"documentMeta": {
										"description": "Document metadata including subject, message, signing order, etc.",
										"type": "object",
										"properties": {
											"subject": {
												"description": "Email subject line when sending document",
												"type": "string"
											},
											"message": {
												"description": "Custom message included in signing invitation",
												"type": "string"
											},
											"forceReadFullDocument": {
												"description": "Whether signers must read the entire document before signing",
												"type": "boolean"
											},
											"showChatToSigners": {
												"description": "Whether to show document chat to signers",
												"type": "boolean"
											},
											"value": {
												"description": "The document's value, such as a contract amount, as free text",
												"type": "string"
											},
											"redirectUrl": {
												"description": "URL to redirect signers to after signing is complete. Must be http(s).",
												"type": "string"
											},
											"redirectEnabled": {
												"description": "Whether redirect after signing is enabled",
												"type": "boolean"
											},
											"internalRecipients": {
												"description": "Email addresses that receive a copy of the sealed PDF once the document is completed (max 5). Pass an empty array to clear.",
												"maxItems": 5,
												"type": "array",
												"items": {
													"type": "string",
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
												}
											},
											"signableAfterExpired": {
												"description": "Whether the document remains signable after its expiration date",
												"type": "boolean"
											},
											"sendPlainTextEmailOnly": {
												"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
												"type": [
													"boolean",
													"null"
												]
											},
											"allowDelegation": {
												"description": "Whether signers may delegate signing to another person",
												"type": "boolean"
											},
											"aiChatEnabled": {
												"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
												"type": [
													"boolean",
													"null"
												]
											},
											"language": {
												"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
												"type": "string",
												"enum": [
													"sv",
													"en",
													"no",
													"da",
													"fi",
													"de",
													"is",
													"es",
													"fr",
													"it"
												]
											},
											"reminderIntervalDays": {
												"description": "Days between automatic reminders. Pass `0` to turn them off, or null to use the default of 3.",
												"type": [
													"integer",
													"null"
												],
												"minimum": 0,
												"maximum": 9007199254740991
											},
											"openVerification": {
												"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"PIN",
													"SMS",
													"EMAIL",
													"SE_BANKID",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													null
												]
											},
											"nationalIdDisplayMode": {
												"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"FULL",
													"PARTIAL",
													"NONE",
													null
												]
											},
											"sameDeviceSigning": {
												"description": "Whether all parties sign in sequence on one device",
												"type": "boolean"
											},
											"documentCategoryId": {
												"description": "Document category (Dokumenttyp) ID. See GET /api/v1/document-categories.",
												"type": [
													"string",
													"null"
												]
											},
											"signingMode": {
												"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
												"type": "string",
												"enum": [
													"PARALLEL",
													"SEQUENTIAL"
												]
											}
										}
									},
									"documentStyle": {
										"description": "Document styling configuration including orientation, padding, background, and layout",
										"type": "object",
										"properties": {
											"orientation": {
												"description": "Document orientation: PORTRAIT (default) or LANDSCAPE",
												"type": "string",
												"enum": [
													"PORTRAIT",
													"LANDSCAPE"
												]
											},
											"paddingEnabled": {
												"description": "Whether to show padding around document content. When false, content fills entire page edge-to-edge (default: true)",
												"type": "boolean"
											},
											"backgroundColor": {
												"description": "Background color for the document in hex format (e.g., #ffffff for white, #000000 for black). Default: #ffffff",
												"type": "string",
												"pattern": "^#[0-9A-Fa-f]{6}$"
											},
											"backgroundOpacity": {
												"description": "Opacity of the background color (0-1). Default: 1",
												"type": "number",
												"minimum": 0,
												"maximum": 1
											},
											"backgroundImageUrl": {
												"description": "URL for the background image",
												"type": [
													"string",
													"null"
												]
											},
											"backgroundImageSize": {
												"description": "Background image sizing: FILL, FIT, or ORIGINAL. Default: FILL",
												"type": "string",
												"enum": [
													"FILL",
													"FIT",
													"ORIGINAL"
												]
											},
											"backgroundImagePosition": {
												"description": "Background image position. Default: CENTER",
												"type": "string",
												"enum": [
													"TOP_LEFT",
													"TOP_CENTER",
													"TOP_RIGHT",
													"CENTER_LEFT",
													"CENTER",
													"CENTER_RIGHT",
													"BOTTOM_LEFT",
													"BOTTOM_CENTER",
													"BOTTOM_RIGHT"
												]
											},
											"backgroundImageRepeat": {
												"description": "Background image repeat: REPEAT or NO_REPEAT. Default: NO_REPEAT",
												"type": "string",
												"enum": [
													"REPEAT",
													"NO_REPEAT"
												]
											},
											"backgroundImageOpacity": {
												"description": "Opacity of the background image (0-1). Default: 1",
												"type": "number",
												"minimum": 0,
												"maximum": 1
											},
											"pageSize": {
												"description": "Page size: A4 (default), A3, or SLIDE",
												"type": "string",
												"enum": [
													"A4",
													"A3",
													"SLIDE"
												]
											},
											"theme": {
												"description": "Document theme: body and heading fonts, text, heading and accent colors, density and text size. null resets to the default theme.",
												"type": [
													"object",
													"null"
												],
												"properties": {
													"bodyFont": {
														"type": "string",
														"enum": [
															"INTER",
															"ARIAL",
															"ROBOTO",
															"OPEN_SANS",
															"LATO",
															"MONTSERRAT",
															"IBM_PLEX_SANS",
															"GEORGIA",
															"MERRIWEATHER",
															"LORA",
															"SOURCE_SERIF",
															"PLAYFAIR"
														]
													},
													"headingFont": {
														"type": "string",
														"enum": [
															"INTER",
															"ARIAL",
															"ROBOTO",
															"OPEN_SANS",
															"LATO",
															"MONTSERRAT",
															"IBM_PLEX_SANS",
															"GEORGIA",
															"MERRIWEATHER",
															"LORA",
															"SOURCE_SERIF",
															"PLAYFAIR"
														]
													},
													"textColor": {
														"type": "string",
														"pattern": "^#[0-9a-fA-F]{6}$"
													},
													"headingColor": {
														"type": "string",
														"pattern": "^#[0-9a-fA-F]{6}$"
													},
													"accentColor": {
														"type": "string",
														"pattern": "^#[0-9a-fA-F]{6}$"
													},
													"density": {
														"type": "string",
														"enum": [
															"COMPACT",
															"NORMAL",
															"RELAXED"
														]
													},
													"textSize": {
														"type": "string",
														"enum": [
															"SM",
															"MD",
															"LG"
														]
													}
												}
											}
										}
									},
									"parties": {
										"description": "Array of parties to add to the document during creation. Provide either contactId to reference existing contacts, or name and email to manually specify party details.",
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"ref": {
													"description": "Your name for the party within this request, such as `buyer`. Content blocks in the same request name the party by it in `partyId`, or in `party` on a `<sajn-field>`.",
													"type": "string",
													"pattern": "^[a-z0-9_-]{1,64}$"
												},
												"contactId": {
													"description": "ID of an existing contact to take the party's details from. Details you also send override the contact's for this document.",
													"type": "string",
													"minLength": 1
												},
												"name": {
													"description": "Party full name. Required without `contactId`.",
													"type": "string",
													"minLength": 1
												},
												"email": {
													"description": "Party email address. Required without `contactId` unless the party gets the invitation only by SMS or in person.",
													"type": "string",
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
												},
												"phone": {
													"description": "Party phone number, for SMS invitations and SMS verification",
													"type": "string",
													"minLength": 1
												},
												"nationalId": {
													"description": "National identity number, such as a Swedish personnummer, matched against the eID at signing",
													"type": "string",
													"minLength": 1
												},
												"externalId": {
													"description": "Your external reference ID for the party",
													"type": "string",
													"minLength": 1
												},
												"role": {
													"default": "SIGNER",
													"type": "string",
													"enum": [
														"SIGNER",
														"ORGANIZER",
														"REVIEWER"
													],
													"description": "Party role: SIGNER, ORGANIZER, or REVIEWER."
												},
												"signingOrder": {
													"description": "Order for sequential signing (1, 2, 3, etc.). Ignored for parallel signing.",
													"type": "number"
												},
												"company": {
													"type": "object",
													"properties": {
														"name": {
															"description": "Company name. Required together with `orgNumber`.",
															"type": "string"
														},
														"orgNumber": {
															"description": "Company organization number. Required together with `name`.",
															"type": "string"
														},
														"role": {
															"description": "The party's role or title at the company, such as CEO or board member",
															"type": "string"
														}
													},
													"description": "The company the party signs for. Leave it out for a private individual."
												},
												"country": {
													"type": "string",
													"description": "ISO 3166-1 alpha-2 country code of the party, such as SE or DE"
												},
												"delivery": {
													"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
													"type": "array",
													"items": {
														"type": "string",
														"enum": [
															"EMAIL",
															"SMS",
															"IN_APP"
														]
													}
												},
												"signatureMethod": {
													"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. Defaults to the workspace setting.",
													"type": "string",
													"enum": [
														"NONE",
														"DRAWING",
														"SE_BANKID",
														"MANUAL",
														"CLICK_TO_SIGN",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"NO_QES",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														"ZEALID_QES"
													]
												},
												"signVerification": {
													"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"openVerification": {
													"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"templatePartyId": {
													"description": "ID of a party of the template in `templateId`, from `GET /api/v1/templates/{id}`. Fills in that party instead of adding one: it keeps its boxes on the PDF and its settings, and the details you send replace its own. When a party names a `templatePartyId`, the template's other parties are kept too, and parties without one are added.",
													"type": "string",
													"minLength": 1
												}
											}
										}
									},
									"content": {
										"description": "Content blocks to create with the document, in the same shape as `POST /api/v1/documents/{id}/content`. A block names a party by its `ref` or its ID.",
										"maxItems": 100,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"TEXT",
														"HTML",
														"FORM",
														"PDF",
														"PRODUCT_TABLE",
														"TABLE",
														"SPACER",
														"PAGE_BREAK",
														"DURATION"
													]
												},
												"position": {
													"description": "0-based index to put the block at, counting any blocks the template adds. The blocks from that index on move down by one. Default: after the blocks before it.",
													"type": "integer",
													"minimum": 0,
													"maximum": 9007199254740991
												},
												"fieldMeta": {
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			},
																			"unit": {
																				"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																				"type": "string",
																				"enum": [
																					"RELATIVE",
																					"POINTS"
																				]
																			},
																			"origin": {
																				"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																				"type": "string",
																				"enum": [
																					"TOP_LEFT",
																					"BOTTOM_LEFT"
																				]
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		]
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind",
																					"inputType"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind"
																				]
																			}
																		],
																		"description": "A box placed on a page of a PDF field"
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						]
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				}
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		]
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	]
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	]
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	]
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	]
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	}
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				]
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		]
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					]
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		]
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																}
															},
															"required": [
																"type"
															]
														}
													]
												}
											},
											"required": [
												"type",
												"fieldMeta"
											]
										}
									},
									"fieldValues": {
										"description": "Values to fill in by key, in the same shape as `values` in `PATCH /api/v1/documents/{id}/field-values`. sajn writes them after `parties` and `content`, and before `send`. If a key matches no value, or a value doesn't fit its field, sajn creates nothing and returns the problems in `issues`.",
										"maxItems": 100,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"key": {
													"type": "string",
													"minLength": 1,
													"description": "The `key` of a value from the field-values list."
												},
												"value": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "boolean"
														},
														{
															"type": "array",
															"items": {
																"type": "string"
															}
														}
													],
													"description": "A list of the selected options for a FORM `CHECKBOX`, a boolean for a PDF checkbox, and a string for every other type."
												}
											},
											"required": [
												"key",
												"value"
											]
										}
									},
									"send": {
										"description": "If true, sends the document for signing after it is created, the same way as `POST /api/v1/documents/{id}/send`. If the send fails, the document stays a draft and the error names its ID.",
										"type": "boolean"
									},
									"customFields": {
										"description": "Custom field values for the document",
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"customFieldId": {
													"type": "string",
													"minLength": 1,
													"description": "ID of the custom field. See GET /api/v1/custom-fields."
												},
												"value": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"customFieldId",
												"value"
											]
										}
									},
									"integrationLink": {
										"description": "Link the document to a CRM record. Prefills mapped custom fields and product tables from the record (configured under Integrations) and enables status write-back to it.",
										"type": "object",
										"properties": {
											"integration": {
												"type": "string",
												"description": "The connected integration the record belongs to: `HUBSPOT`.",
												"enum": [
													"HUBSPOT"
												]
											},
											"type": {
												"type": "string",
												"description": "The type of the external record: `DEAL`.",
												"enum": [
													"DEAL"
												]
											},
											"id": {
												"type": "string",
												"minLength": 1,
												"description": "The external record ID, such as the HubSpot deal ID."
											}
										},
										"required": [
											"integration",
											"type",
											"id"
										]
									}
								},
								"required": [
									"name"
								]
							},
							"example": {
								"name": "Anställningsavtal – Kai Lindqvist",
								"externalId": "HR-2026-0142",
								"templateId": "cm4k2x9p10008abcd1234efgh",
								"expiresAt": "2026-10-28T22:00:00.000Z",
								"documentMeta": {
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober."
								},
								"parties": [
									{
										"ref": "employee",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"role": "SIGNER",
										"signatureMethod": "SE_BANKID"
									}
								],
								"fieldValues": [
									{
										"key": "befattning",
										"value": "Rekryterare"
									}
								],
								"customFields": [
									{
										"customFieldId": "cm4k2x9p10016abcd1234efgh",
										"value": "2026-11-01"
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													},
													"ref": {
														"description": "The `ref` you gave the party in the request. Left out when you gave none.",
														"type": "string",
														"pattern": "^[a-z0-9_-]{1,64}$"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "DRAFT",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z",
									"completedAt": null,
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": null,
											"readStatus": "NOT_OPENED",
											"signingStatus": "NOT_SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "NOT_SENT",
											"identityVerified": false,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z",
											"ref": "employee"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"validation": {
										"summary": "VALIDATION_FAILED",
										"value": {
											"code": "VALIDATION_FAILED",
											"message": "Invalid input: expected string, received undefined",
											"userMessage": "Förfrågan innehåller ogiltiga värden.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
											"issues": [
												{
													"path": "name",
													"code": "INVALID_TYPE",
													"message": "Invalid input: expected string, received undefined"
												}
											]
										}
									},
									"responsibleUser": {
										"summary": "VALIDATION_FAILED",
										"value": {
											"code": "VALIDATION_FAILED",
											"message": "The responsible user isn't a member of the workspace",
											"userMessage": "Den ansvariga användaren finns inte i arbetsytan.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
											"issues": [
												{
													"path": "",
													"code": "INVALID_VALUE",
													"message": "The responsible user isn't a member of the workspace"
												}
											]
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}": {
			"get": {
				"description": "Retrieve detailed information about a specific document including all parties, tags, and custom field values.\n\nThe response includes:\n- Document metadata (subject, message, signing order, etc.)\n- All document parties with their status\n- Applied tags\n- Custom field values\n- Product tables with their resolved totals\n- Document timestamps (created, updated, completed, archived)\n\n**Content blocks:** `content` is null unless you pass `expand=content`. To poll a document's status, leave it out. To read the content, pass `expand=content` or call `GET /api/v1/documents/{id}/content`.",
				"summary": "Get a document by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Related data to include in the response, comma-separated or repeated. `content` adds the document's content blocks.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"content"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocument",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "COMPLETED",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"completedAt": "2026-09-29T07:41:00.000Z",
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"patch": {
				"description": "Update document properties. A DRAFT document accepts every field. After sending, what you can change depends on the field, and a locked field returns `409 INVALID_STATE` with the reason.\n\n**Updatable Fields:**\n- `name` - Document title\n- `externalId` - Your external reference ID\n- `expiresAt` - Document expiration date\n- `responsibleUserId` - User ID of responsible team member (must be in your organization)\n- `documentMeta` - Metadata, such as the subject, the message, and the signing mode\n- `customFields` - Custom field values\n\n**Per-party settings:** Delivery method and signature type are set per party through the parties endpoints, not at the document level.\n\n**After sending:**\n- `name`, `externalId`, `responsibleUserId`, `value` and `documentCategoryId` can always change.\n- Reminders, subject, message, redirect, chat, delegation, internal recipients and `signableAfterExpired` can change until the document is completed, cancelled or rejected.\n- `expiresAt` moves the deadline (at least 24 hours ahead) and notifies the parties, like `POST /api/v1/documents/{id}/extend-expiration`.\n- `openVerification`, `forceReadFullDocument` and `language` can change until someone has signed.\n- `signingMode`, `nationalIdDisplayMode`, `sameDeviceSigning` and `documentStyle` can't change; withdraw the document first.\n\n**Response:** Returns the updated document in the same shape as `GET /api/v1/documents/{id}`, without `fields`.",
				"summary": "Update a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string"
									},
									"externalId": {
										"description": "Your external reference ID for the document. Pass null to clear it.",
										"type": [
											"string",
											"null"
										]
									},
									"expiresAt": {
										"type": [
											"string",
											"null"
										],
										"format": "date-time"
									},
									"responsibleUserId": {
										"description": "User ID of the person responsible for this document. Must be a member of your organization.",
										"type": "string"
									},
									"documentMeta": {
										"type": "object",
										"properties": {
											"subject": {
												"description": "Email subject line when sending document",
												"type": "string"
											},
											"message": {
												"description": "Custom message included in signing invitation",
												"type": "string"
											},
											"forceReadFullDocument": {
												"description": "Whether signers must read the entire document before signing",
												"type": "boolean"
											},
											"showChatToSigners": {
												"description": "Whether to show document chat to signers",
												"type": "boolean"
											},
											"value": {
												"description": "The document's value, such as a contract amount, as free text",
												"type": "string"
											},
											"redirectUrl": {
												"description": "URL to redirect signers to after signing is complete. Must be http(s).",
												"type": "string"
											},
											"redirectEnabled": {
												"description": "Whether redirect after signing is enabled",
												"type": "boolean"
											},
											"internalRecipients": {
												"description": "Email addresses that receive a copy of the sealed PDF once the document is completed (max 5). Pass an empty array to clear.",
												"maxItems": 5,
												"type": "array",
												"items": {
													"type": "string",
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
												}
											},
											"signableAfterExpired": {
												"description": "Whether the document remains signable after its expiration date",
												"type": "boolean"
											},
											"sendPlainTextEmailOnly": {
												"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
												"type": [
													"boolean",
													"null"
												]
											},
											"allowDelegation": {
												"description": "Whether signers may delegate signing to another person",
												"type": "boolean"
											},
											"aiChatEnabled": {
												"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
												"type": [
													"boolean",
													"null"
												]
											},
											"language": {
												"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
												"type": "string",
												"enum": [
													"sv",
													"en",
													"no",
													"da",
													"fi",
													"de",
													"is",
													"es",
													"fr",
													"it"
												]
											},
											"reminderIntervalDays": {
												"description": "Days between automatic reminders. Pass `0` to turn them off, or null to use the default of 3.",
												"type": [
													"integer",
													"null"
												],
												"minimum": 0,
												"maximum": 9007199254740991
											},
											"openVerification": {
												"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"PIN",
													"SMS",
													"EMAIL",
													"SE_BANKID",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													null
												]
											},
											"nationalIdDisplayMode": {
												"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"FULL",
													"PARTIAL",
													"NONE",
													null
												]
											},
											"sameDeviceSigning": {
												"description": "Whether all parties sign in sequence on one device",
												"type": "boolean"
											},
											"documentCategoryId": {
												"description": "Document category (Dokumenttyp) ID. See GET /api/v1/document-categories.",
												"type": [
													"string",
													"null"
												]
											},
											"signingMode": {
												"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
												"type": "string",
												"enum": [
													"PARALLEL",
													"SEQUENTIAL"
												]
											}
										}
									},
									"documentStyle": {
										"description": "Document styling configuration including orientation, padding, background, and layout",
										"type": "object",
										"properties": {
											"orientation": {
												"description": "Document orientation: PORTRAIT (default) or LANDSCAPE",
												"type": "string",
												"enum": [
													"PORTRAIT",
													"LANDSCAPE"
												]
											},
											"paddingEnabled": {
												"description": "Whether to show padding around document content. When false, content fills entire page edge-to-edge (default: true)",
												"type": "boolean"
											},
											"backgroundColor": {
												"description": "Background color for the document in hex format (e.g., #ffffff for white, #000000 for black). Default: #ffffff",
												"type": "string",
												"pattern": "^#[0-9A-Fa-f]{6}$"
											},
											"backgroundOpacity": {
												"description": "Opacity of the background color (0-1). Default: 1",
												"type": "number",
												"minimum": 0,
												"maximum": 1
											},
											"backgroundImageUrl": {
												"description": "URL for the background image",
												"type": [
													"string",
													"null"
												]
											},
											"backgroundImageSize": {
												"description": "Background image sizing: FILL, FIT, or ORIGINAL. Default: FILL",
												"type": "string",
												"enum": [
													"FILL",
													"FIT",
													"ORIGINAL"
												]
											},
											"backgroundImagePosition": {
												"description": "Background image position. Default: CENTER",
												"type": "string",
												"enum": [
													"TOP_LEFT",
													"TOP_CENTER",
													"TOP_RIGHT",
													"CENTER_LEFT",
													"CENTER",
													"CENTER_RIGHT",
													"BOTTOM_LEFT",
													"BOTTOM_CENTER",
													"BOTTOM_RIGHT"
												]
											},
											"backgroundImageRepeat": {
												"description": "Background image repeat: REPEAT or NO_REPEAT. Default: NO_REPEAT",
												"type": "string",
												"enum": [
													"REPEAT",
													"NO_REPEAT"
												]
											},
											"backgroundImageOpacity": {
												"description": "Opacity of the background image (0-1). Default: 1",
												"type": "number",
												"minimum": 0,
												"maximum": 1
											},
											"pageSize": {
												"description": "Page size: A4 (default), A3, or SLIDE",
												"type": "string",
												"enum": [
													"A4",
													"A3",
													"SLIDE"
												]
											},
											"theme": {
												"description": "Document theme: body and heading fonts, text, heading and accent colors, density and text size. null resets to the default theme.",
												"type": [
													"object",
													"null"
												],
												"properties": {
													"bodyFont": {
														"type": "string",
														"enum": [
															"INTER",
															"ARIAL",
															"ROBOTO",
															"OPEN_SANS",
															"LATO",
															"MONTSERRAT",
															"IBM_PLEX_SANS",
															"GEORGIA",
															"MERRIWEATHER",
															"LORA",
															"SOURCE_SERIF",
															"PLAYFAIR"
														]
													},
													"headingFont": {
														"type": "string",
														"enum": [
															"INTER",
															"ARIAL",
															"ROBOTO",
															"OPEN_SANS",
															"LATO",
															"MONTSERRAT",
															"IBM_PLEX_SANS",
															"GEORGIA",
															"MERRIWEATHER",
															"LORA",
															"SOURCE_SERIF",
															"PLAYFAIR"
														]
													},
													"textColor": {
														"type": "string",
														"pattern": "^#[0-9a-fA-F]{6}$"
													},
													"headingColor": {
														"type": "string",
														"pattern": "^#[0-9a-fA-F]{6}$"
													},
													"accentColor": {
														"type": "string",
														"pattern": "^#[0-9a-fA-F]{6}$"
													},
													"density": {
														"type": "string",
														"enum": [
															"COMPACT",
															"NORMAL",
															"RELAXED"
														]
													},
													"textSize": {
														"type": "string",
														"enum": [
															"SM",
															"MD",
															"LG"
														]
													}
												}
											}
										}
									},
									"customFields": {
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"customFieldId": {
													"type": "string",
													"minLength": 1,
													"description": "ID of the custom field. See GET /api/v1/custom-fields."
												},
												"value": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"customFieldId",
												"value"
											]
										}
									}
								}
							},
							"example": {
								"expiresAt": "2026-11-15T22:00:00.000Z",
								"documentMeta": {
									"message": "Hej Kai! Här är ditt anställningsavtal med det nya startdatumet."
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-11-15T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "DRAFT",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z",
									"completedAt": null,
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"invalid_state": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
											"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"bundleOwnsSetting": {
										"summary": "BUNDLE_OWNS_SETTING",
										"value": {
											"code": "BUNDLE_OWNS_SETTING",
											"message": "Document cm4k2x9p10003abcd1234efgh belongs to package cm4k2x9p10044abcd1234efgh",
											"userMessage": "Dokumentet ingår i ett paket. Ändra den här inställningen i paketet.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Move a document to the trash. It is marked as deleted but not yet removed — restore it, or let the workspace's trash window purge it.\n\nWorks for every status, including `COMPLETED`. You are the controller of your data; deciding when a signed agreement goes is your call.\n\n**Response:** Returns the document in the same shape as `GET /api/v1/documents/{id}`, without `fields`, with `deletedAt` set. The list and `GET /api/v1/documents/{id}` don't return a document in the trash.\n\n**To remove a document immediately and irreversibly**, use `POST /api/v1/documents/{id}/purge`.",
				"summary": "Delete a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteDocument",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "COMPLETED",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"completedAt": "2026-09-29T07:41:00.000Z",
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:delete"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/activity": {
			"get": {
				"description": "Retrieve the activity/audit log for a specific document. Returns all activity events sorted newest-first.\n\n**Response includes:**\n- Event type (e.g., DOCUMENT_CREATED, DOCUMENT_SIGNED, EMAIL_SENT)\n- Timestamp of the event\n- Event-specific data payload\n- Name and email of the person who triggered the event (when available)\n\n**Privacy:** Sensitive fields such as IP address, user agent, and request metadata are not included in the response.",
				"summary": "Get document activity log",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentActivity",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique audit log entry ID"
													},
													"createdAt": {
														"description": "Timestamp when the event occurred",
														"type": "string",
														"format": "date-time"
													},
													"type": {
														"type": "string",
														"description": "Event type (e.g., DOCUMENT_CREATED, DOCUMENT_SIGNED, EMAIL_SENT)"
													},
													"data": {
														"type": "object",
														"additionalProperties": {},
														"description": "Event-specific data payload"
													},
													"name": {
														"description": "Name of the person who triggered the event",
														"type": [
															"string",
															"null"
														]
													},
													"email": {
														"description": "Email of the person who triggered the event",
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"createdAt",
													"type",
													"data",
													"name",
													"email"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10034abcd1234efgh",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"type": "DOCUMENT_SIGNED",
											"data": {
												"partyId": "cm4k2x9p10004abcd1234efgh",
												"signatureType": "SE_BANKID"
											},
											"name": "Kai Lindqvist",
											"email": "kai@example.com"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires audit:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"audit:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Activity not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "activity"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"audit:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/signatures": {
			"get": {
				"description": "The identity each eID actually verified, per signature — as opposed to the signer details the sender entered when creating the document.\n\n**Why this is a separate endpoint:** `party.nationalId` is what the sender supplied. It is never overwritten with what the eID returned, so the two can differ, and this is where you read the verified one.\n\n**One shape for every eID.** Keys are always present and null when a scheme issues nothing, so you never branch on provider to find where the identity lives:\n- `identity.nationalId` — the national identity number, masked per the workspace's national ID display setting. **Null for schemes that issue none:** MitID without CPR scope, MitID Erhverv, and iDIN, which may never expose a BSN.\n- `identity.serialNumber` — always present. A stable, non-sensitive reference for this person at your organization. Use it to recognise a returning signer without ever handling a national id. Scoped per organization, so the same person yields a different value for a different customer.\n- `identity.match` — whether the verified identity matched the intended signer. Computed before masking, so it stays meaningful even when `nationalId` is hidden by policy.\n\n`identity` is null for drawn and click-to-sign signatures: nothing verified an identity.\n\n**Permissions:** requires the `READ_DOCUMENT` workspace permission and the `signatures:read` scope. `documents:read` alone never returns a national identity number.\n\n**Auditing:** every call is recorded on the organization audit log — who read a verified identity and when. The identity values themselves are never logged.",
				"summary": "Get verified signer identities",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentSignatures",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"partyId": {
														"type": "string",
														"description": "The party ID."
													},
													"partyName": {
														"type": "string",
														"description": "The name on the party record, as entered by the sender."
													},
													"signedAt": {
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"identity": {
														"description": "Null when no eID verified this signature — a drawn or click-to-sign signature.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"provider": {
																"type": "string",
																"description": "The eID that verified this identity, e.g. SE_BANKID, DK_MITID. Also tells you the format of nationalId."
															},
															"name": {
																"description": "Legal name as reported by the eID — not the name the sender typed.",
																"type": [
																	"string",
																	"null"
																]
															},
															"nationalId": {
																"description": "National identity number the eID returned, masked per the workspace national ID display setting. Null when the scheme issues none: MitID without CPR scope, and iDIN, which may never expose a BSN.",
																"type": [
																	"string",
																	"null"
																]
															},
															"nationalIdSuppressed": {
																"description": "Set when a national id exists but the workspace policy hides it. Distinguishes \"hidden from you\" from \"the eID never issued one\".",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"WORKSPACE_POLICY",
																	null
																]
															},
															"serialNumber": {
																"description": "Stable, non-sensitive reference for this person at this organization. Present for every eID. Use it to recognise a returning signer without handling a national id. Scoped per organization, so it cannot be correlated across customers.",
																"type": [
																	"string",
																	"null"
																]
															},
															"dateOfBirth": {
																"description": "ISO date, when the scheme reports it.",
																"type": [
																	"string",
																	"null"
																]
															},
															"company": {
																"description": "Registry-verified organizational identity — MitID Erhverv only.",
																"type": [
																	"object",
																	"null"
																],
																"properties": {
																	"orgNumber": {
																		"type": "string"
																	},
																	"name": {
																		"type": [
																			"string",
																			"null"
																		]
																	}
																},
																"required": [
																	"orgNumber",
																	"name"
																],
																"additionalProperties": false
															},
															"match": {
																"type": "object",
																"properties": {
																	"status": {
																		"type": "string",
																		"enum": [
																			"MATCH",
																			"MISMATCH",
																			"NOT_CHECKED"
																		]
																	},
																	"method": {
																		"type": [
																			"string",
																			"null"
																		],
																		"enum": [
																			"NATIONAL_ID",
																			"NAME",
																			null
																		]
																	}
																},
																"required": [
																	"status",
																	"method"
																],
																"additionalProperties": false,
																"description": "Whether the verified identity matched the signer the sender intended. Computed before masking, so it stays meaningful even when nationalId is hidden."
															}
														},
														"required": [
															"provider",
															"name",
															"nationalId",
															"nationalIdSuppressed",
															"serialNumber",
															"dateOfBirth",
															"company",
															"match"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"partyId",
													"partyName",
													"signedAt",
													"identity"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"partyId": "cm4k2x9p10004abcd1234efgh",
											"partyName": "Kai Lindqvist",
											"signedAt": "2026-09-29T07:41:00.000Z",
											"identity": {
												"provider": "SE_BANKID",
												"name": "Kai Lindqvist",
												"nationalId": "191212121212",
												"nationalIdSuppressed": null,
												"serialNumber": "a1f39c0e7b2d4e58",
												"dateOfBirth": "1990-01-01",
												"company": null,
												"match": {
													"status": "MATCH",
													"method": "NATIONAL_ID"
												}
											}
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires signatures:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"signatures:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"signatures:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/files": {
			"get": {
				"description": "Lists the files of a document that are ready to download, each with a pre-signed URL that works for 15 minutes.\n\n- `ORIGINAL`: the unsigned source document, after the document is sent and sajn has generated the PDF. It's ready when `document.sent` fires. For a QES document, and for some documents where a party picks products, sajn generates it after the parties have filled in their fields. A draft has no `ORIGINAL`.\n- `SIGNED`: the signed and sealed copy, after the document is completed and sealed.\n- `JOURNAL`: the signing journal (audit trail), after the document is completed.\n\nA file that isn't ready yet isn't listed. Every URL in the response counts as a download in the document's audit trail.",
				"summary": "List document files",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentFiles",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"ORIGINAL",
															"SIGNED",
															"JOURNAL"
														],
														"description": "ORIGINAL, SIGNED, or JOURNAL"
													},
													"url": {
														"type": "string",
														"format": "uri",
														"description": "Pre-signed URL to download the file"
													},
													"expiresAt": {
														"description": "Date and time when `url` stops working, 15 minutes after the request",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"type",
													"url",
													"expiresAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"type": "ORIGINAL",
											"url": "https://files.sajn.se/files/anstallningsavtal-kai-lindqvist.pdf",
											"expiresAt": "2026-10-28T22:00:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "File not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "file"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/files/{type}": {
			"get": {
				"description": "Gets one file of a document, `ORIGINAL`, `SIGNED`, or `JOURNAL`, with a pre-signed URL that works for 15 minutes.\n\nA file that isn't ready yet, such as the signed copy of a pending document, returns `409 INVALID_STATE`. To see which files are ready, call `GET /api/v1/documents/{id}/files`.",
				"summary": "Get a document file",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"description": "Document ID",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "type",
						"in": "path",
						"description": "The file: the unsigned ORIGINAL, the SIGNED and sealed copy, or the JOURNAL (audit trail).",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"ORIGINAL",
								"SIGNED",
								"JOURNAL"
							]
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentFile",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"type": {
											"type": "string",
											"enum": [
												"ORIGINAL",
												"SIGNED",
												"JOURNAL"
											],
											"description": "ORIGINAL, SIGNED, or JOURNAL"
										},
										"url": {
											"type": "string",
											"format": "uri",
											"description": "Pre-signed URL to download the file"
										},
										"expiresAt": {
											"description": "Date and time when `url` stops working, 15 minutes after the request",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"type",
										"url",
										"expiresAt"
									],
									"additionalProperties": false
								},
								"example": {
									"type": "ORIGINAL",
									"url": "https://files.sajn.se/files/anstallningsavtal-kai-lindqvist.pdf",
									"expiresAt": "2026-10-28T22:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "File not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "file"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/readiness": {
			"get": {
				"description": "Runs the checks `POST /api/v1/documents/{id}/send` runs before it sends, without sending. `ready` is true when no `BLOCKER` remains. Each issue has a `code`, such as `MISSING_EMAIL` or `NO_EXPIRATION`, an English `message`, and a Swedish `userMessage` that names the party or field.\n\nWhen a send fails the same checks, it returns an HTTP `409 Conflict` status code with code `DOCUMENT_NOT_READY` and this list in `readiness`.",
				"summary": "Check whether a document is ready to send",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentReadiness",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"ready": {
											"type": "boolean",
											"description": "True when nothing blocks sending the document; warnings can remain."
										},
										"issues": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											},
											"description": "Blockers first, then warnings"
										}
									},
									"required": [
										"ready",
										"issues"
									],
									"additionalProperties": false
								},
								"example": {
									"ready": false,
									"issues": [
										{
											"code": "MISSING_PHONE",
											"severity": "BLOCKER",
											"message": "A party invited by SMS has no phone number.",
											"userMessage": "Kai Lindqvist saknar telefonnummer för SMS-leverans."
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/send": {
			"post": {
				"description": "Send a document to signers for signing.\n\n**Request Body:**\n- `customMessage` (optional) - Custom message to include in the signing invitation emails/SMS. Supports newline characters (`\\n`) for line breaks. Available template variables (use `{{variableName}}` syntax): `{{firstName}}`, `{{lastName}}`, `{{fullName}}`, `{{recipientFirstName}}`, `{{recipientLastName}}`, `{{recipientFullName}}`, `{{recipientEmail}}`, `{{recipientPhone}}`, `{{recipientCompanyName}}`, `{{recipientCompanyRole}}`, `{{recipientCompanyOrgNumber}}`, `{{recipientRole}}`, `{{senderFirstName}}`, `{{senderLastName}}`, `{{senderFullName}}`, `{{senderEmail}}`, `{{senderCompanyName}}`, `{{documentName}}`, `{{documentId}}`, `{{documentValue}}`, `{{documentCreatedDate}}`, `{{expirationDate}}`, `{{signUrl}}`. Custom fields are available as `{{custom.<field-slug>}}` using the slugified field name (e.g. \"Avtalsdatum (demo)\" becomes `{{custom.avtalsdatum-demo}}`); secured fields are excluded.\n\n**Prerequisites:**\n- Document must have at least one signer added via `POST /documents/{id}/parties` or when creating the document\n- Each signer's delivery method (`EMAIL`, `SMS`, or `NONE`) and signature type (`DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`) are configured per-signer when adding them\n\n**Responses:**\n- **200** - The document is sent. Returns the document in the same shape as `GET /api/v1/documents/{id}`, without `fields`.\n- **409** with `code: \"APPROVAL_REQUIRED\"` - You lack the `SEND_WITHOUT_APPROVAL` permission, so the document needs an approval first. Request one with `POST /api/v1/approval-requests`; the document is sent when it's approved.\n- **409** with `code: \"INVALID_STATE\"` - The document isn't a draft, or its approval request is still pending.\n\n**Approved documents:** A document whose approval request is `APPROVED` but that wasn't sent automatically (`autoSend` false) stays `PENDING_APPROVAL`. The user who requested the approval sends it with this endpoint, and the invitation uses the message stored on the approval request.\n\n**What happens when you send:**\n1. Document status changes from `DRAFT` to `PENDING`\n2. sajn sends each party an invitation through the channels in its `delivery`\n3. A party with `delivery: []` gets no invitation, so share its signing URL yourself",
				"summary": "Send document for signing",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "sendDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"customMessage": {
										"description": "Optional custom message to include in the signing invitation. Supports newline characters (\\n) for line breaks. Available template variables (use {{variableName}} syntax): {{firstName}}, {{lastName}}, {{fullName}}, {{recipientFirstName}}, {{recipientLastName}}, {{recipientFullName}}, {{recipientEmail}}, {{recipientPhone}}, {{recipientCompanyName}}, {{recipientCompanyRole}}, {{recipientCompanyOrgNumber}}, {{recipientRole}}, {{senderFirstName}}, {{senderLastName}}, {{senderFullName}}, {{senderEmail}}, {{senderCompanyName}}, {{documentName}}, {{documentId}}, {{documentValue}}, {{documentCreatedDate}}, {{expirationDate}}, {{signUrl}}. Custom fields are available as {{custom.<field-slug>}} using the slugified field name (e.g. \"Avtalsdatum (demo)\" becomes {{custom.avtalsdatum-demo}}); secured fields are excluded.",
										"type": "string"
									}
								},
								"description": "Send the document for signing."
							},
							"example": {
								"customMessage": "Välkommen till Exempelbolaget, Kai! Signera avtalet med BankID."
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "PENDING",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"completedAt": null,
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "customMessage",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"insufficient_scope": {
										"summary": "INSUFFICIENT_SCOPE",
										"value": {
											"code": "INSUFFICIENT_SCOPE",
											"message": "Insufficient OAuth scope: requires documents:write",
											"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
											"requiredScopes": [
												"documents:write"
											],
											"grantedScopes": [
												"profile:read"
											]
										}
									},
									"limitExceeded": {
										"summary": "LIMIT_EXCEEDED",
										"value": {
											"code": "LIMIT_EXCEEDED",
											"message": "Monthly limit for sent documents reached",
											"userMessage": "Du har nått din gräns för max antal dokument att skicka denna månad.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"invalid_state": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
											"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"notDraft": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The document must be a draft to send it",
											"userMessage": "Dokumentet måste vara i status DRAFT för att kunna skickas.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"approvalRequired": {
										"summary": "APPROVAL_REQUIRED",
										"value": {
											"code": "APPROVAL_REQUIRED",
											"message": "The document needs an approval before you can send it. Request one with POST /api/v1/approval-requests; the document is sent when it's approved",
											"userMessage": "Dokumentet måste godkännas innan det kan skickas.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/withdraw": {
			"post": {
				"description": "Withdraw (cancel) a document that has been sent out for signing. The document is returned to `DRAFT` status and signers are notified.\n\n**Status Requirements:**\n- Document must be in `PENDING` status; any other status returns `409 INVALID_STATE`. Use `DELETE /api/v1/documents/{id}` for documents in `DRAFT`, and `POST /api/v1/approval-requests/{id}/cancel` for `PENDING_APPROVAL`.\n\n**Permissions:**\n- Requires the `WITHDRAW_DOCUMENT` workspace permission.\n\n**Request Body:**\n- `reason` (optional) - Free-text reason. Included in withdrawal emails to signers and stored on the audit log.\n\n**What happens when you withdraw:**\n1. Document status is set back to `DRAFT`\n2. Any existing signatures and signer verifications are removed\n3. Each signer's signing/sending/read status is reset\n4. Pending signing reminders are cancelled\n5. A withdrawal email is sent to every signer that had been notified\n6. The `document.withdrawn` webhook is triggered\n\n**Response:** Returns the document in the same shape as `GET /api/v1/documents/{id}`, without `fields`.",
				"summary": "Withdraw a sent document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "withdrawDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"reason": {
										"description": "Optional reason for withdrawing the document. Included in notification emails to signers and the audit log.",
										"type": "string"
									}
								},
								"description": "Withdraw a sent document. Returns the document to DRAFT status, removes any signatures, and notifies signers via email."
							},
							"example": {
								"reason": "Fel startdatum i avtalet."
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "DRAFT",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z",
									"completedAt": null,
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "reason",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"invalid_state": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
											"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"notPending": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The document can only be withdrawn when its status is PENDING",
											"userMessage": "Dokumentet kan endast återkallas när det är i status PENDING.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/complete": {
			"post": {
				"description": "Complete a sent document now and seal it with the signatures it has. Use it when a party will never sign and the signatures already collected are enough. It can't be undone.\n\n**Status Requirements:**\n- Document must be in `PENDING` or `EXPIRED` status, and at least one party must have signed. Otherwise it returns `409 INVALID_STATE`.\n\n**Permissions:**\n- Requires the `FORCE_COMPLETE_DOCUMENT` workspace permission.\n\n**Request Body:**\n- `reason` (optional) - Free-text reason, stored on the audit log.\n\n**What happens when you complete:**\n1. Pending reminders are cancelled\n2. The document is sealed in the background with the signatures it has\n3. Each party that didn't sign is emailed that the document was completed without them\n4. The `document.completed` webhook is triggered once the document is sealed\n\n**Response:** Returns the document in the same shape as `GET /api/v1/documents/{id}`, without `fields`. Sealing runs in the background, so the status is still `PENDING` or `EXPIRED` until `document.completed` arrives.",
				"summary": "Complete a document before every party has signed",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "completeDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"reason": {
										"description": "Optional reason for completing the document before every party has signed. Stored on the audit log.",
										"type": "string"
									}
								},
								"description": "Complete a PENDING or EXPIRED document before every party has signed. Seals it with the signatures it has."
							},
							"example": {
								"reason": "Motparten har lämnat bolaget."
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "COMPLETED",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"completedAt": "2026-09-29T07:41:00.000Z",
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "reason",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"invalid_state": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
											"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"notPending": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "Only a PENDING or EXPIRED document can be completed",
											"userMessage": "Endast dokument som väntar på signering kan avslutas manuellt.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"noSignatures": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "At least one party must sign before the document can be completed",
											"userMessage": "Minst en part måste ha signerat innan dokumentet kan avslutas manuellt.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/extend-expiration": {
			"post": {
				"description": "Change the expiration date of a document that has already been sent for signing. The new date can be earlier or later than the current one.\n\n**Status Requirements:**\n- Document must be in `PENDING` or `EXPIRED` status. An `EXPIRED` document returns to `PENDING`. A document in any other status returns `409 INVALID_STATE`. For `DRAFT` documents, set `expiresAt` with `PATCH /api/v1/documents/{id}` instead.\n\n**Permissions:**\n- Requires the `EDIT_DOCUMENT` workspace permission.\n\n**Request Body:**\n- `expiresAt` (required) - The new expiration date/time (ISO 8601). Must be at least 24 hours in the future.\n\n**What happens:**\n1. The document's `expiresAt` is updated.\n2. An audit log entry is recorded.\n3. Every recipient that is still notifiable (has an email, notifications enabled, delivery method other than `NONE`, and has not rejected) is emailed that the signing deadline has moved.\n\n**Response:** Returns the document in the same shape as `GET /api/v1/documents/{id}`, without `fields`.",
				"summary": "Change a sent document's expiration date",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "extendDocumentExpiration",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"expiresAt": {
										"description": "New expiration date/time (ISO 8601). Must be at least 24 hours in the future. Can be earlier or later than the current expiration.",
										"type": "string",
										"format": "date-time"
									}
								},
								"required": [
									"expiresAt"
								],
								"description": "Change the expiration date of a PENDING or EXPIRED document. Recipients are notified that the deadline moved."
							},
							"example": {
								"expiresAt": "2026-11-15T22:00:00.000Z"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-11-15T22:00:00.000Z",
									"name": "Anställningsavtal – Kai Lindqvist",
									"status": "PENDING",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"completedAt": null,
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10003abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "expiresAt",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/purge": {
			"post": {
				"description": "Irreversibly delete a document: database rows, uploaded files, the sealed PDF, the signing certificate and the audit trail. There is no undo and no support path to recover it.\n\n**Requirements:**\n- The document must already be in the trash. Call `DELETE /api/v1/documents/{id}` first.\n- Requires the `PERMANENTLY_DELETE_DOCUMENT` workspace permission, which is not part of the default document-permission set.\n- Requires the `documents:delete` scope.\n\n**Completed documents:** allowed, and the verify link printed into the sealed PDF keeps working. It resolves to a record holding the document ID, the sealed PDF's SHA-256 and the deletion date — and no personal data. A counterparty holding the PDF can still check their copy against that hash; the PAdES signature in their file also validates on its own, without sajn.\n\n**Backups:** the document is gone from the live database immediately. Encrypted database backups roll off within 7 days.",
				"summary": "Permanently delete a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "purgeDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"confirmDocumentId": {
										"type": "string",
										"description": "Must equal the document id in the path. Guards against an accidental purge of the wrong document."
									}
								},
								"required": [
									"confirmDocumentId"
								],
								"description": "Permanently delete a document that is already in the trash. Irreversible."
							},
							"example": {
								"confirmDocumentId": "cm4k2x9p10003abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Confirmation that a document was permanently deleted.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The document ID."
										},
										"name": {
											"type": "string"
										},
										"purged": {
											"type": "boolean",
											"enum": [
												true
											]
										},
										"verificationRetained": {
											"type": "boolean",
											"description": "True when a tombstone was kept so the sealed PDF's verify link still resolves."
										}
									},
									"required": [
										"id",
										"name",
										"purged",
										"verificationRetained"
									],
									"additionalProperties": false,
									"description": "Confirmation that a document was permanently deleted."
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"name": "Anställningsavtal – Kai Lindqvist",
									"purged": true,
									"verificationRetained": false
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"validation": {
										"summary": "VALIDATION_FAILED",
										"value": {
											"code": "VALIDATION_FAILED",
											"message": "Invalid input: expected string, received undefined",
											"userMessage": "Förfrågan innehåller ogiltiga värden.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
											"issues": [
												{
													"path": "confirmDocumentId",
													"code": "INVALID_TYPE",
													"message": "Invalid input: expected string, received undefined"
												}
											]
										}
									},
									"confirmMismatch": {
										"summary": "VALIDATION_FAILED",
										"value": {
											"code": "VALIDATION_FAILED",
											"message": "confirmDocumentId must match the document id in the path",
											"userMessage": "Förfrågan innehåller ogiltiga värden.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
											"issues": [
												{
													"path": "",
													"code": "INVALID_VALUE",
													"message": "confirmDocumentId must match the document id in the path"
												}
											]
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:delete"
						]
					}
				]
			}
		},
		"/api/v1/bundles": {
			"post": {
				"description": "Creates a draft bundle. A bundle sends several documents as one invitation, so each party signs all of their documents with one signature. Every document keeps its own signature, seal, audit trail, and certificate.\n\nThe bundle owns who signs and how the send behaves: its parties and its send settings, which it writes onto every document in it. Each document keeps its content, fields, and document-level settings.\n\nPass `documentIds` to add existing drafts. Their parties become the bundle's parties, one per email address. A person who signs with different methods, verifications, or roles on different documents, or documents with different signing modes, return `409 INVALID_STATE`. A document without parties gets every bundle party.\n\nPass `parties` to set the parties yourself. They replace the parties the documents brought, and a party whose email address one of the documents already had keeps that document's fields.\n\nSend the bundle with `POST /api/v1/bundles/{id}/send` once it holds 2 or more documents.\n\n**Permission required:** `EDIT_DOCUMENT` on the workspace, and access to every document in the bundle. Requires a Team plan.",
				"summary": "Create a bundle",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createBundle",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
										"type": [
											"string",
											"null"
										],
										"maxLength": 200
									},
									"subject": {
										"description": "The subject line of the invitation email.",
										"type": [
											"string",
											"null"
										]
									},
									"message": {
										"description": "A message included in every invitation.",
										"type": [
											"string",
											"null"
										]
									},
									"expiresAt": {
										"description": "The expiry date of the bundle. Every document in it gets the same one.",
										"type": [
											"string",
											"null"
										],
										"format": "date-time"
									},
									"signableAfterExpired": {
										"description": "Whether the documents can still be signed after `expiresAt`.",
										"type": "boolean"
									},
									"sendPlainTextEmailOnly": {
										"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
										"type": [
											"boolean",
											"null"
										]
									},
									"redirectUrl": {
										"description": "URL to send a party to once they have signed. Must be http(s).",
										"type": [
											"string",
											"null"
										]
									},
									"redirectEnabled": {
										"description": "Whether `redirectUrl` is used.",
										"type": "boolean"
									},
									"signingMode": {
										"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle.",
										"type": "string",
										"enum": [
											"PARALLEL",
											"SEQUENTIAL"
										]
									},
									"language": {
										"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`.",
										"type": "string",
										"enum": [
											"sv",
											"en",
											"no",
											"da",
											"fi",
											"de",
											"is",
											"es",
											"fr",
											"it"
										]
									},
									"reminderIntervalDays": {
										"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
										"type": [
											"integer",
											"null"
										],
										"minimum": 0,
										"maximum": 9007199254740991
									},
									"internalRecipients": {
										"description": "Email addresses that receive a copy of each sealed PDF once its document is completed. At most 5. Pass an empty array to clear.",
										"maxItems": 5,
										"type": "array",
										"items": {
											"type": "string",
											"format": "email",
											"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
										}
									},
									"nationalIdDisplayMode": {
										"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"FULL",
											"PARTIAL",
											"NONE",
											null
										]
									},
									"openVerification": {
										"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"PIN",
											"SMS",
											"EMAIL",
											"SE_BANKID",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											null
										]
									},
									"documentIds": {
										"description": "Draft documents to add, up to 50. Each one must be a `DRAFT` in the workspace that isn't in another bundle, and each of its parties needs an email address. Its parties become the bundle's parties, one per email address.",
										"maxItems": 50,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1
										}
									},
									"parties": {
										"description": "The bundle's parties. When you pass them, they replace the parties the documents brought, as `PUT /api/v1/bundles/{id}/parties` does.",
										"maxItems": 100,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"name": {
													"type": "string",
													"minLength": 1,
													"description": "The party's full name."
												},
												"email": {
													"type": "string",
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
													"description": "The email address the party gets the invitation at. A bundle has one party per email address, and a party already in the bundle with this address keeps its ID, so the fields assigned to it stay."
												},
												"phone": {
													"description": "Phone number, for SMS invitations and SMS verification.",
													"type": [
														"string",
														"null"
													]
												},
												"role": {
													"description": "`SIGNER` (default), `ORGANIZER`, or `REVIEWER`. Only `SIGNER` parties sign.",
													"type": "string",
													"enum": [
														"SIGNER",
														"ORGANIZER",
														"REVIEWER"
													]
												},
												"signingOrder": {
													"description": "The party's step for `SEQUENTIAL` signing. Defaults to its position in `parties`, starting at 1.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"delivery": {
													"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
													"type": "array",
													"items": {
														"type": "string",
														"enum": [
															"EMAIL",
															"SMS",
															"IN_APP"
														]
													}
												},
												"signatureMethod": {
													"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. A party already in the bundle keeps its method when you leave it out, and a new one gets `DRAWING`.",
													"type": "string",
													"enum": [
														"NONE",
														"DRAWING",
														"SE_BANKID",
														"MANUAL",
														"CLICK_TO_SIGN",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"NO_QES",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														"ZEALID_QES"
													]
												},
												"signVerification": {
													"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"openVerification": {
													"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the bundle's.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"documentIds": {
													"description": "The documents in the bundle the party is on. Leave it out for every document.",
													"maxItems": 50,
													"type": "array",
													"items": {
														"type": "string",
														"minLength": 1
													}
												}
											},
											"required": [
												"name",
												"email"
											],
											"additionalProperties": false
										}
									}
								},
								"additionalProperties": false
							},
							"example": {
								"name": "Anställningspaket – Kai Lindqvist",
								"expiresAt": "2026-10-28T22:00:00.000Z",
								"documentIds": [
									"cm4k2x9p10003abcd1234efgh",
									"cm4k2x9p10022abcd1234efgh"
								],
								"parties": [
									{
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"signatureMethod": "SE_BANKID"
									}
								]
							}
						}
					}
				},
				"responses": {
					"201": {
						"description": "201",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The bundle ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10044abcd1234efgh",
									"name": "Anställningspaket – Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "DRAFT",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "NOT_SIGNED",
													"signedAt": null
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Bundle not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "bundle"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"get": {
				"description": "Lists the workspace's bundles in every status, newest first. A bundle is listed only if you can read every document in it.\n\nTo list the documents of one bundle with their full details, call `GET /api/v1/documents?bundleId={id}`.",
				"summary": "List bundles",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getBundles",
				"responses": {
					"200": {
						"description": "Bundles, newest first",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The bundle ID."
													},
													"name": {
														"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
														"type": [
															"string",
															"null"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"OPEN",
															"COMPLETED",
															"CANCELED"
														],
														"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
													},
													"subject": {
														"description": "The subject line of the invitation email.",
														"type": [
															"string",
															"null"
														]
													},
													"message": {
														"description": "A message included in every invitation.",
														"type": [
															"string",
															"null"
														]
													},
													"expiresAt": {
														"description": "The expiry date of the bundle. Every document in it gets the same one.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"signingMode": {
														"type": "string",
														"enum": [
															"PARALLEL",
															"SEQUENTIAL"
														],
														"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														],
														"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
													},
													"reminderIntervalDays": {
														"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"signableAfterExpired": {
														"type": "boolean",
														"description": "Whether the documents can still be signed after `expiresAt`."
													},
													"internalRecipients": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
													},
													"nationalIdDisplayMode": {
														"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"FULL",
															"PARTIAL",
															"NONE",
															null
														]
													},
													"openVerification": {
														"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendPlainTextEmailOnly": {
														"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
														"type": [
															"boolean",
															"null"
														]
													},
													"redirectUrl": {
														"description": "URL to send a party to once they have signed.",
														"type": [
															"string",
															"null"
														]
													},
													"redirectEnabled": {
														"type": "boolean",
														"description": "Whether `redirectUrl` is used."
													},
													"documentCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "The number of documents in `documents`."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the bundle was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the bundle was last updated."
													},
													"documents": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The document ID."
																},
																"name": {
																	"type": "string"
																},
																"status": {
																	"type": "string",
																	"enum": [
																		"DRAFT",
																		"PENDING_APPROVAL",
																		"PENDING",
																		"COMPLETED",
																		"EXPIRED",
																		"CANCELLED",
																		"REJECTED",
																		"IMPORTED"
																	]
																},
																"parties": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"description": "The party ID on this document, for the document and party endpoints."
																			},
																			"bundlePartyId": {
																				"description": "The bundle party this document party belongs to, from `parties`.",
																				"type": [
																					"string",
																					"null"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"email": {
																				"type": [
																					"string",
																					"null"
																				],
																				"format": "email",
																				"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																			},
																			"role": {
																				"type": "string",
																				"enum": [
																					"SIGNER",
																					"ORGANIZER",
																					"REVIEWER"
																				]
																			},
																			"signingStatus": {
																				"type": "string",
																				"enum": [
																					"NOT_SIGNED",
																					"SIGNED",
																					"REJECTED"
																				]
																			},
																			"signedAt": {
																				"type": [
																					"string",
																					"null"
																				],
																				"format": "date-time"
																			}
																		},
																		"required": [
																			"id",
																			"bundlePartyId",
																			"name",
																			"email",
																			"role",
																			"signingStatus",
																			"signedAt"
																		],
																		"additionalProperties": false
																	}
																}
															},
															"required": [
																"id",
																"name",
																"status",
																"parties"
															],
															"additionalProperties": false
														},
														"description": "The documents in the bundle, oldest first."
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": "string",
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
																	"description": "The email address the party gets the invitation at. A bundle has one party per email address."
																},
																"phone": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingOrder": {
																	"description": "The party's step for `SEQUENTIAL` signing.",
																	"type": [
																		"integer",
																		"null"
																	],
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"delivery": {
																	"type": "array",
																	"items": {
																		"type": "string",
																		"enum": [
																			"EMAIL",
																			"SMS",
																			"IN_APP"
																		]
																	},
																	"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
																},
																"signatureMethod": {
																	"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"NONE",
																		"DRAWING",
																		"SE_BANKID",
																		"MANUAL",
																		"CLICK_TO_SIGN",
																		"NO_BANKID_BIOMETRIC",
																		"NO_BANKID_HIGH",
																		"NO_QES",
																		"DK_MITID",
																		"DK_MITID_ERHVERV",
																		"FI_FTN",
																		"NL_IDIN",
																		"ZEALID_QES",
																		null
																	]
																},
																"signVerification": {
																	"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"PIN",
																		"SMS",
																		"EMAIL",
																		"SE_BANKID",
																		"NO_BANKID_BIOMETRIC",
																		"NO_BANKID_HIGH",
																		"DK_MITID",
																		"DK_MITID_ERHVERV",
																		"FI_FTN",
																		"NL_IDIN",
																		null
																	]
																},
																"openVerification": {
																	"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"PIN",
																		"SMS",
																		"EMAIL",
																		"SE_BANKID",
																		"NO_BANKID_BIOMETRIC",
																		"NO_BANKID_HIGH",
																		"DK_MITID",
																		"DK_MITID_ERHVERV",
																		"FI_FTN",
																		"NL_IDIN",
																		null
																	]
																},
																"status": {
																	"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"PENDING",
																		"SIGNED",
																		"REJECTED",
																		null
																	]
																},
																"documentIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	},
																	"description": "The documents in the bundle the party is on."
																}
															},
															"required": [
																"id",
																"name",
																"email",
																"phone",
																"role",
																"signingOrder",
																"delivery",
																"signatureMethod",
																"signVerification",
																"openVerification",
																"status",
																"documentIds"
															],
															"additionalProperties": false
														},
														"description": "The bundle's parties, in signing order."
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"subject",
													"message",
													"expiresAt",
													"signingMode",
													"language",
													"reminderIntervalDays",
													"signableAfterExpired",
													"internalRecipients",
													"nationalIdDisplayMode",
													"openVerification",
													"sendPlainTextEmailOnly",
													"redirectUrl",
													"redirectEnabled",
													"documentCount",
													"createdAt",
													"updatedAt",
													"documents",
													"parties"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Bundles, newest first"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10044abcd1234efgh",
											"name": "Kai Lindqvist",
											"status": "DRAFT",
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"expiresAt": "2026-10-28T22:00:00.000Z",
											"signingMode": "PARALLEL",
											"language": "sv",
											"reminderIntervalDays": 3,
											"signableAfterExpired": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"nationalIdDisplayMode": "FULL",
											"openVerification": "PIN",
											"sendPlainTextEmailOnly": false,
											"redirectUrl": null,
											"redirectEnabled": true,
											"documentCount": 1,
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"documents": [
												{
													"id": "cm4k2x9p10003abcd1234efgh",
													"name": "Anställningsavtal – Kai Lindqvist",
													"status": "COMPLETED",
													"parties": [
														{
															"id": "cm4k2x9p10004abcd1234efgh",
															"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
															"name": "Kai Lindqvist",
															"email": "kai@example.com",
															"role": "SIGNER",
															"signingStatus": "SIGNED",
															"signedAt": "2026-09-29T07:41:00.000Z"
														}
													]
												}
											],
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"phone": "+46701740605",
													"role": "SIGNER",
													"signingOrder": 1,
													"delivery": [
														"EMAIL"
													],
													"signatureMethod": "SE_BANKID",
													"signVerification": "PIN",
													"openVerification": "PIN",
													"status": "PENDING",
													"documentIds": [
														"cm4k2x9p10003abcd1234efgh"
													]
												}
											]
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Bundle not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "bundle"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}": {
			"get": {
				"description": "Gets a bundle in any status, with its settings, its parties and the documents each one is on, and the signing status of every party on every document. Returns `404 NOT_FOUND` if you can't read every document in it.\n\nSigning URLs aren't included. To get a party's signing URL, call `GET /api/v1/bundles/{id}/parties/{partyId}`.",
				"summary": "Get a bundle",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getBundle",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The bundle ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10044abcd1234efgh",
									"name": "Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "COMPLETED",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "SIGNED",
													"signedAt": "2026-09-29T07:41:00.000Z"
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Bundle not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "bundle"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"patch": {
				"description": "Updates the bundle's send settings and writes them onto every document in it. A setting you leave out keeps its value.\n\nWorks only while the bundle is a `DRAFT`. On a sent bundle it returns `409 INVALID_STATE`; withdraw it first with `POST /api/v1/bundles/{id}/withdraw`.\n\n**Permission required:** `EDIT_DOCUMENT` on the workspace, and access to every document in the bundle. Requires a Team plan.",
				"summary": "Update a bundle's settings",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateBundle",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
										"type": [
											"string",
											"null"
										],
										"maxLength": 200
									},
									"subject": {
										"description": "The subject line of the invitation email.",
										"type": [
											"string",
											"null"
										]
									},
									"message": {
										"description": "A message included in every invitation.",
										"type": [
											"string",
											"null"
										]
									},
									"expiresAt": {
										"description": "The expiry date of the bundle. Every document in it gets the same one.",
										"type": [
											"string",
											"null"
										],
										"format": "date-time"
									},
									"signableAfterExpired": {
										"description": "Whether the documents can still be signed after `expiresAt`.",
										"type": "boolean"
									},
									"sendPlainTextEmailOnly": {
										"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
										"type": [
											"boolean",
											"null"
										]
									},
									"redirectUrl": {
										"description": "URL to send a party to once they have signed. Must be http(s).",
										"type": [
											"string",
											"null"
										]
									},
									"redirectEnabled": {
										"description": "Whether `redirectUrl` is used.",
										"type": "boolean"
									},
									"signingMode": {
										"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle.",
										"type": "string",
										"enum": [
											"PARALLEL",
											"SEQUENTIAL"
										]
									},
									"language": {
										"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`.",
										"type": "string",
										"enum": [
											"sv",
											"en",
											"no",
											"da",
											"fi",
											"de",
											"is",
											"es",
											"fr",
											"it"
										]
									},
									"reminderIntervalDays": {
										"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
										"type": [
											"integer",
											"null"
										],
										"minimum": 0,
										"maximum": 9007199254740991
									},
									"internalRecipients": {
										"description": "Email addresses that receive a copy of each sealed PDF once its document is completed. At most 5. Pass an empty array to clear.",
										"maxItems": 5,
										"type": "array",
										"items": {
											"type": "string",
											"format": "email",
											"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
										}
									},
									"nationalIdDisplayMode": {
										"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"FULL",
											"PARTIAL",
											"NONE",
											null
										]
									},
									"openVerification": {
										"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"PIN",
											"SMS",
											"EMAIL",
											"SE_BANKID",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											null
										]
									}
								},
								"additionalProperties": false
							},
							"example": {
								"message": "Hej Kai! Här är ditt anställningsavtal och sekretessavtalet. Signera båda med BankID.",
								"reminderIntervalDays": 2
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The bundle ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10044abcd1234efgh",
									"name": "Anställningspaket – Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 2,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "DRAFT",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "NOT_SIGNED",
													"signedAt": null
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Bundle not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "bundle"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}/documents": {
			"post": {
				"description": "Adds draft documents to the bundle, up to 50 in total. A document's parties join the bundle's parties: a party whose email address the bundle already has is matched to it, and a new address becomes a new bundle party. A document without parties gets every bundle party. The bundle's settings are written onto the added documents. A document is refused with 409 when one email address has a different signing method, verification, role or personal number than in the bundle, or when its signing mode or party order differs from the bundle's.\n\nWorks only while the bundle is a `DRAFT`. On a sent bundle it returns `409 INVALID_STATE`; withdraw it first with `POST /api/v1/bundles/{id}/withdraw`.\n\n**Permission required:** `EDIT_DOCUMENT` on the workspace, and access to every document in the bundle. Requires a Team plan.",
				"summary": "Add documents to a bundle",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "addBundleDocuments",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"documentIds": {
										"minItems": 1,
										"maxItems": 50,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1
										},
										"description": "Draft documents to add. Each one must be a `DRAFT` in the workspace that isn't in another bundle, and each of its parties needs an email address."
									}
								},
								"required": [
									"documentIds"
								],
								"additionalProperties": false
							},
							"example": {
								"documentIds": [
									"cm4k2x9p10022abcd1234efgh"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The document ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the document was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the document was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"name": "Anställningspaket – Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "DRAFT",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "NOT_SIGNED",
													"signedAt": null
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected array, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "documentIds",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected array, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}/documents/{documentId}": {
			"delete": {
				"description": "Removes a document from the bundle. It stays a `DRAFT` with the parties and settings it has.\n\nWorks only while the bundle is a `DRAFT`. On a sent bundle it returns `409 INVALID_STATE`; withdraw it first with `POST /api/v1/bundles/{id}/withdraw`.\n\n**Permission required:** `EDIT_DOCUMENT` on the workspace, and access to every document in the bundle. Requires a Team plan.",
				"summary": "Remove a document from a bundle",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "documentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "removeBundleDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {}
							},
							"example": {}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The document ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the document was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the document was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10003abcd1234efgh",
									"name": "Anställningspaket – Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "DRAFT",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "NOT_SIGNED",
													"signedAt": null
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}/parties": {
			"put": {
				"description": "Replaces the bundle's parties and the documents each one is on, and writes them onto every document.\n\nA party whose email address the bundle already has keeps its ID, and its parties on the documents keep theirs, so the fields assigned to them stay. A party you leave out, or take off a document with `documentIds`, is removed from those documents: its signature and initials boxes are removed, and fields it filled in keep their values as fixed text.\n\nWorks only while the bundle is a `DRAFT`. On a sent bundle it returns `409 INVALID_STATE`; withdraw it first with `POST /api/v1/bundles/{id}/withdraw`.\n\n**Permission required:** `EDIT_DOCUMENT` on the workspace, and access to every document in the bundle. Requires a Team plan.",
				"summary": "Set a bundle's parties",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "replaceBundleParties",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"parties": {
										"maxItems": 100,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"name": {
													"type": "string",
													"minLength": 1,
													"description": "The party's full name."
												},
												"email": {
													"type": "string",
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
													"description": "The email address the party gets the invitation at. A bundle has one party per email address, and a party already in the bundle with this address keeps its ID, so the fields assigned to it stay."
												},
												"phone": {
													"description": "Phone number, for SMS invitations and SMS verification.",
													"type": [
														"string",
														"null"
													]
												},
												"role": {
													"description": "`SIGNER` (default), `ORGANIZER`, or `REVIEWER`. Only `SIGNER` parties sign.",
													"type": "string",
													"enum": [
														"SIGNER",
														"ORGANIZER",
														"REVIEWER"
													]
												},
												"signingOrder": {
													"description": "The party's step for `SEQUENTIAL` signing. Defaults to its position in `parties`, starting at 1.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"delivery": {
													"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
													"type": "array",
													"items": {
														"type": "string",
														"enum": [
															"EMAIL",
															"SMS",
															"IN_APP"
														]
													}
												},
												"signatureMethod": {
													"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. A party already in the bundle keeps its method when you leave it out, and a new one gets `DRAWING`.",
													"type": "string",
													"enum": [
														"NONE",
														"DRAWING",
														"SE_BANKID",
														"MANUAL",
														"CLICK_TO_SIGN",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"NO_QES",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														"ZEALID_QES"
													]
												},
												"signVerification": {
													"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"openVerification": {
													"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the bundle's.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"documentIds": {
													"description": "The documents in the bundle the party is on. Leave it out for every document.",
													"maxItems": 50,
													"type": "array",
													"items": {
														"type": "string",
														"minLength": 1
													}
												}
											},
											"required": [
												"name",
												"email"
											],
											"additionalProperties": false
										},
										"description": "Every party of the bundle, in signing order. A party left out is removed from every document, along with the signature boxes assigned to it."
									}
								},
								"required": [
									"parties"
								],
								"additionalProperties": false
							},
							"example": {
								"parties": [
									{
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"signatureMethod": "SE_BANKID"
									},
									{
										"name": "Alex Berg",
										"email": "alex@example.com",
										"role": "REVIEWER",
										"documentIds": [
											"cm4k2x9p10003abcd1234efgh"
										]
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The party ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the party was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the party was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"name": "Anställningspaket – Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "DRAFT",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "NOT_SIGNED",
													"signedAt": null
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected array, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "parties",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected array, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}/send": {
			"post": {
				"description": "Sends a draft bundle of 2 to 50 documents. sajn checks every document first and sends none of them if one fails: `409 INVALID_STATE` lists the reasons in `userMessage`. For example, a document has a blocker such as a missing signature box, needs approval, or has a party without an email address. The monthly limit counts every document.\n\nThe bundle's `status` is `OPEN` from this call. Each party gets one invitation once every document's PDF is ready, and the bundle fires `bundle.sent`.\n\n**Permission required:** `SEND_DOCUMENT` on the workspace, and access to every document in the bundle. Requires a Team plan.",
				"summary": "Send a bundle",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "sendBundle",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {}
							},
							"example": {}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The bundle ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10044abcd1234efgh",
									"name": "Kai Lindqvist",
									"status": "OPEN",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "COMPLETED",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "SIGNED",
													"signedAt": "2026-09-29T07:41:00.000Z"
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Bundle not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "bundle"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}/withdraw": {
			"post": {
				"description": "Takes an `OPEN` bundle back to `DRAFT` so you can change it and send it again. Every document returns to `DRAFT` and stays in the bundle, and every signature is cleared, so everyone signs again after the next send. Each document fires `document.withdrawn`.\n\nA bundle with a document that is already completed returns `409 INVALID_STATE`. To stop a bundle for good, cancel it with `POST /api/v1/bundles/{id}/cancel`.\n\n**Permission required:** `WITHDRAW_DOCUMENT` on the workspace, and access to every document in the bundle.",
				"summary": "Withdraw a bundle",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "withdrawBundle",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"reason": {
										"description": "Why the bundle is withdrawn, included in the email to the parties.",
										"type": "string",
										"maxLength": 1000
									}
								},
								"additionalProperties": false
							},
							"example": {
								"reason": "Fel startdatum i avtalet."
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The bundle ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10044abcd1234efgh",
									"name": "Anställningspaket – Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "DRAFT",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "NOT_SIGNED",
													"signedAt": null
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "reason",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Bundle not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "bundle"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}/cancel": {
			"post": {
				"description": "Cancels a sent bundle and withdraws every document in it that isn't signed yet. Withdrawn documents return to `DRAFT` and leave the bundle, and each fires `document.withdrawn`. Documents that are already signed stay signed and stay in the bundle.\n\nReturns the bundle. Its `status` is `CANCELED` when every unsigned document was withdrawn, and the bundle fires `bundle.cancelled`. If a document can't be withdrawn, the bundle stays `OPEN` and that document stays in `documents` with its current status. A bundle that is a `DRAFT` or already canceled returns `409 INVALID_STATE`.\n\n**Permission required:** `WITHDRAW_DOCUMENT` on the workspace.",
				"summary": "Cancel a bundle",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "cancelBundle",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {}
							},
							"example": {}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The bundle ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the bundle was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10044abcd1234efgh",
									"name": "Kai Lindqvist",
									"status": "DRAFT",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "COMPLETED",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "SIGNED",
													"signedAt": "2026-09-29T07:41:00.000Z"
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Bundle not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "bundle"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/bundles/{id}/parties/{partyId}": {
			"get": {
				"description": "Gets one party of a sent bundle, including their signing URL. The URL opens every document the party signs in the bundle. A `DRAFT` bundle has no signing URLs yet and returns `409 INVALID_STATE`.\n\n**Security note:** each call writes an audit entry on every document the party signs in the bundle.\n\n**Permission required:** `SEND_DOCUMENT` on the workspace, and access to every document in the bundle.",
				"summary": "Get a bundle party with signing URL",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "partyId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The party ID.",
						"example": "cm4k2x9p10004abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getBundleParty",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
										},
										"name": {
											"type": "string"
										},
										"email": {
											"type": "string",
											"format": "email",
											"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
											"description": "The email address the party gets the invitation at. A bundle has one party per email address."
										},
										"phone": {
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"type": "string",
											"enum": [
												"SIGNER",
												"ORGANIZER",
												"REVIEWER"
											]
										},
										"signingOrder": {
											"description": "The party's step for `SEQUENTIAL` signing.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"delivery": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"EMAIL",
													"SMS",
													"IN_APP"
												]
											},
											"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
										},
										"signatureMethod": {
											"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NONE",
												"DRAWING",
												"SE_BANKID",
												"MANUAL",
												"CLICK_TO_SIGN",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"signVerification": {
											"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"openVerification": {
											"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"status": {
											"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PENDING",
												"SIGNED",
												"REJECTED",
												null
											]
										},
										"documentIds": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "The documents in the bundle the party is on."
										},
										"bundleId": {
											"type": "string",
											"description": "The bundle ID."
										},
										"signingUrl": {
											"type": "string",
											"description": "The bundle page for this party. It opens every document they sign in the bundle."
										}
									},
									"required": [
										"id",
										"name",
										"email",
										"phone",
										"role",
										"signingOrder",
										"delivery",
										"signatureMethod",
										"signVerification",
										"openVerification",
										"status",
										"documentIds",
										"bundleId",
										"signingUrl"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"name": "Kai Lindqvist",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"role": "SIGNER",
									"signingOrder": 1,
									"delivery": [
										"EMAIL"
									],
									"signatureMethod": "SE_BANKID",
									"signVerification": "PIN",
									"openVerification": "PIN",
									"status": "PENDING",
									"documentIds": [
										"cm4k2x9p10003abcd1234efgh"
									],
									"bundleId": "cm4k2x9p10044abcd1234efgh",
									"signingUrl": "https://app.sajn.se/sign/cm4k2x9p10003abcd1234efgh?token=Xk9mQ2vR7tLp4wZs8nYb3"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"patch": {
				"description": "Corrects the email address or phone number of a party in an `OPEN` bundle, on every document they haven't signed yet, and sends them a fresh invitation. A new email address gets a new link, and the old one stops working. This is the one change a sent bundle takes.\n\nTo change anything else, withdraw the bundle with `POST /api/v1/bundles/{id}/withdraw`, change it, and send it again. On a `DRAFT` bundle, use `PUT /api/v1/bundles/{id}/parties`.\n\n**Permission required:** `EDIT_DOCUMENT` on the workspace, and access to every document in the bundle. Requires a Team plan.",
				"summary": "Correct a party's contact details",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The bundle ID.",
						"example": "cm4k2x9p10044abcd1234efgh"
					},
					{
						"name": "partyId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The party ID.",
						"example": "cm4k2x9p10004abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "correctBundleParty",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"email": {
										"description": "The corrected email address. The party gets a new link and a fresh invitation, and the old link stops working.",
										"type": "string",
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"phone": {
										"description": "The corrected phone number. Pass null to clear it.",
										"type": [
											"string",
											"null"
										]
									}
								},
								"additionalProperties": false
							},
							"example": {
								"email": "kai.lindqvist@example.com"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The party ID."
										},
										"name": {
											"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"OPEN",
												"COMPLETED",
												"CANCELED"
											],
											"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
										},
										"subject": {
											"description": "The subject line of the invitation email.",
											"type": [
												"string",
												"null"
											]
										},
										"message": {
											"description": "A message included in every invitation.",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "The expiry date of the bundle. Every document in it gets the same one.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"signingMode": {
											"type": "string",
											"enum": [
												"PARALLEL",
												"SEQUENTIAL"
											],
											"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
										},
										"reminderIntervalDays": {
											"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
											"type": [
												"integer",
												"null"
											],
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"signableAfterExpired": {
											"type": "boolean",
											"description": "Whether the documents can still be signed after `expiresAt`."
										},
										"internalRecipients": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
										},
										"nationalIdDisplayMode": {
											"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"FULL",
												"PARTIAL",
												"NONE",
												null
											]
										},
										"openVerification": {
											"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendPlainTextEmailOnly": {
											"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
											"type": [
												"boolean",
												"null"
											]
										},
										"redirectUrl": {
											"description": "URL to send a party to once they have signed.",
											"type": [
												"string",
												"null"
											]
										},
										"redirectEnabled": {
											"type": "boolean",
											"description": "Whether `redirectUrl` is used."
										},
										"documentCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "The number of documents in `documents`."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the party was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the party was last updated."
										},
										"documents": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The document ID."
													},
													"name": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING_APPROVAL",
															"PENDING",
															"COMPLETED",
															"EXPIRED",
															"CANCELLED",
															"REJECTED",
															"IMPORTED"
														]
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The party ID on this document, for the document and party endpoints."
																},
																"bundlePartyId": {
																	"description": "The bundle party this document party belongs to, from `parties`.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"email": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "email",
																	"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	]
																},
																"signingStatus": {
																	"type": "string",
																	"enum": [
																		"NOT_SIGNED",
																		"SIGNED",
																		"REJECTED"
																	]
																},
																"signedAt": {
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"bundlePartyId",
																"name",
																"email",
																"role",
																"signingStatus",
																"signedAt"
															],
															"additionalProperties": false
														}
													}
												},
												"required": [
													"id",
													"name",
													"status",
													"parties"
												],
												"additionalProperties": false
											},
											"description": "The documents in the bundle, oldest first."
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
													},
													"name": {
														"type": "string"
													},
													"email": {
														"type": "string",
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
														"description": "The email address the party gets the invitation at. A bundle has one party per email address."
													},
													"phone": {
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														]
													},
													"signingOrder": {
														"description": "The party's step for `SEQUENTIAL` signing.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"status": {
														"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PENDING",
															"SIGNED",
															"REJECTED",
															null
														]
													},
													"documentIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "The documents in the bundle the party is on."
													}
												},
												"required": [
													"id",
													"name",
													"email",
													"phone",
													"role",
													"signingOrder",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"status",
													"documentIds"
												],
												"additionalProperties": false
											},
											"description": "The bundle's parties, in signing order."
										}
									},
									"required": [
										"id",
										"name",
										"status",
										"subject",
										"message",
										"expiresAt",
										"signingMode",
										"language",
										"reminderIntervalDays",
										"signableAfterExpired",
										"internalRecipients",
										"nationalIdDisplayMode",
										"openVerification",
										"sendPlainTextEmailOnly",
										"redirectUrl",
										"redirectEnabled",
										"documentCount",
										"createdAt",
										"updatedAt",
										"documents",
										"parties"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"name": "Kai Lindqvist",
									"status": "OPEN",
									"subject": "Ditt anställningsavtal från Exempelbolaget AB",
									"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"signingMode": "PARALLEL",
									"language": "sv",
									"reminderIntervalDays": 3,
									"signableAfterExpired": false,
									"internalRecipients": [
										"hr@example.com"
									],
									"nationalIdDisplayMode": "FULL",
									"openVerification": "PIN",
									"sendPlainTextEmailOnly": false,
									"redirectUrl": null,
									"redirectEnabled": true,
									"documentCount": 1,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"documents": [
										{
											"id": "cm4k2x9p10003abcd1234efgh",
											"name": "Anställningsavtal – Kai Lindqvist",
											"status": "COMPLETED",
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"bundlePartyId": "cm4k2x9p10004abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"role": "SIGNER",
													"signingStatus": "SIGNED",
													"signedAt": "2026-09-29T07:41:00.000Z"
												}
											]
										}
									],
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"role": "SIGNER",
											"signingOrder": 1,
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"status": "PENDING",
											"documentIds": [
												"cm4k2x9p10003abcd1234efgh"
											]
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "email",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/parties": {
			"post": {
				"description": "Add a party (signer/participant) to a document. The party must reference an existing contact.\n\n**Party Roles:**\n- `SIGNER` - Must sign the document\n- `ORGANIZER` - Document organizer (no signature required)\n- `REVIEWER` - Reviews document (no signature required)\n\n**Per-Party Settings:**\n- `delivery` - How the party gets the invitation: `[\"EMAIL\"]` (default), `[\"SMS\"]`, `[\"IN_APP\"]` to sign in person on your device, or `[]` to send nothing and share the signing URL yourself\n- `signatureMethod` - How the party signs: `DRAWING`, `SE_BANKID` (Swedish BankID), `CLICK_TO_SIGN`, `MANUAL`, or a national eID scheme. eID schemes are switched on market by market, so call `GET /api/v1/helpers/signature-methods` for the set your account can use\n- `signVerification` - Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null (default) means none. Call `GET /api/v1/helpers/two-step-verifications` for the live list\n\n**Signing Order:** For SEQUENTIAL signing, specify the order (1, 2, 3...). For PARALLEL signing, order is ignored.\n\n**Response:** Returns the created party, with its `signingUrl`, in the shape of `GET /api/v1/documents/:id/parties/:partyId`. sajn logs that you read the signing URL in the document's audit trail.",
				"summary": "Add a party to document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createParty",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"contactId": {
										"type": "string",
										"minLength": 1,
										"description": "ID of the contact to add as a signer"
									},
									"role": {
										"default": "SIGNER",
										"type": "string",
										"enum": [
											"SIGNER",
											"ORGANIZER",
											"REVIEWER"
										],
										"description": "Party role: SIGNER, ORGANIZER, or REVIEWER."
									},
									"signingOrder": {
										"description": "Signing order for sequential signing (ignored for parallel)",
										"type": [
											"number",
											"null"
										]
									},
									"delivery": {
										"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"EMAIL",
												"SMS",
												"IN_APP"
											]
										}
									},
									"signatureMethod": {
										"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. Defaults to the workspace setting.",
										"type": "string",
										"enum": [
											"NONE",
											"DRAWING",
											"SE_BANKID",
											"MANUAL",
											"CLICK_TO_SIGN",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"NO_QES",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											"ZEALID_QES"
										]
									},
									"signVerification": {
										"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"PIN",
											"SMS",
											"EMAIL",
											"SE_BANKID",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											null
										]
									},
									"openVerification": {
										"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"PIN",
											"SMS",
											"EMAIL",
											"SE_BANKID",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											null
										]
									}
								},
								"required": [
									"contactId"
								],
								"description": "Create signer request"
							},
							"example": {
								"contactId": "cm4k2x9p10006abcd1234efgh",
								"role": "SIGNER",
								"signatureMethod": "SE_BANKID"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The party ID"
										},
										"documentId": {
											"type": "string",
											"description": "The ID of the document the party belongs to"
										},
										"email": {
											"description": "Signer email address",
											"type": [
												"string",
												"null"
											],
											"format": "email",
											"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
										},
										"name": {
											"type": "string",
											"description": "Signer full name"
										},
										"phone": {
											"description": "Signer phone number (for SMS notifications)",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"INDIVIDUAL",
												"COMPANY"
											],
											"description": "Party type: INDIVIDUAL or COMPANY"
										},
										"company": {
											"description": "The company the party signs for, or null for a private individual",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"description": "ID of the linked company in your workspace",
													"type": [
														"string",
														"null"
													]
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Company organization number",
													"type": [
														"string",
														"null"
													]
												},
												"role": {
													"description": "The party's role or title at the company",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"role"
											],
											"additionalProperties": false
										},
										"externalId": {
											"description": "Your external reference ID for this signer",
											"type": [
												"string",
												"null"
											]
										},
										"contactId": {
											"description": "ID of the contact this party was created from, if any",
											"type": [
												"string",
												"null"
											]
										},
										"nationalId": {
											"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"type": "string",
											"enum": [
												"SIGNER",
												"ORGANIZER",
												"REVIEWER"
											],
											"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
										},
										"signingOrder": {
											"description": "Order for sequential signing (null for parallel)",
											"type": [
												"number",
												"null"
											]
										},
										"signedAt": {
											"description": "Date and time when the signer signed (null if not signed)",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"readStatus": {
											"type": "string",
											"enum": [
												"NOT_OPENED",
												"OPENED",
												"READ"
											],
											"description": "Read status: NOT_OPENED, OPENED, or READ"
										},
										"signingStatus": {
											"type": "string",
											"enum": [
												"NOT_SIGNED",
												"SIGNED",
												"REJECTED"
											],
											"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
										},
										"delivery": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"EMAIL",
													"SMS",
													"IN_APP"
												]
											},
											"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
										},
										"signatureMethod": {
											"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NONE",
												"DRAWING",
												"SE_BANKID",
												"MANUAL",
												"CLICK_TO_SIGN",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"signVerification": {
											"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"openVerification": {
											"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendStatus": {
											"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NOT_SENT",
												"SENT",
												"DELIVERED",
												"BOUNCED",
												"FAILED",
												null
											]
										},
										"signingUrl": {
											"type": "string",
											"description": "Complete signing URL for this signer"
										},
										"identityVerified": {
											"type": "boolean",
											"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
										},
										"identityMismatch": {
											"type": "boolean",
											"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
										},
										"createdAt": {
											"description": "When the party was added to the document",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"email",
										"name",
										"phone",
										"type",
										"company",
										"externalId",
										"contactId",
										"nationalId",
										"country",
										"role",
										"signingOrder",
										"signedAt",
										"readStatus",
										"signingStatus",
										"delivery",
										"signatureMethod",
										"signVerification",
										"openVerification",
										"sendStatus",
										"signingUrl",
										"identityVerified",
										"identityMismatch",
										"createdAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"email": "kai@example.com",
									"name": "Kai Lindqvist",
									"phone": "+46701740605",
									"type": "INDIVIDUAL",
									"company": null,
									"externalId": "HR-2026-0142",
									"contactId": "cm4k2x9p10006abcd1234efgh",
									"nationalId": "191212121212",
									"country": "SE",
									"role": "SIGNER",
									"signingOrder": 1,
									"signedAt": null,
									"readStatus": "NOT_OPENED",
									"signingStatus": "NOT_SIGNED",
									"delivery": [
										"EMAIL"
									],
									"signatureMethod": "SE_BANKID",
									"signVerification": "PIN",
									"openVerification": "PIN",
									"sendStatus": "NOT_SENT",
									"signingUrl": "https://app.sajn.se/sign/cm4k2x9p10003abcd1234efgh?token=Xk9mQ2vR7tLp4wZs8nYb3",
									"identityVerified": false,
									"identityMismatch": false,
									"createdAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "contactId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"invalid_state": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
											"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"notEditable": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The document must be a draft or pending to add a party",
											"userMessage": "Dokumentet måste vara i status \"DRAFT\" eller \"PENDING\" för att lägga till en part.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"get": {
				"description": "Retrieve all parties for a document WITHOUT signing URLs.\n\nThis endpoint returns party information for display purposes. Signing URLs are not included for security reasons.\n\nTo get a party's signing URL (which creates an audit log entry), use the GET /documents/:id/parties/:partyId endpoint.",
				"summary": "List all parties for a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getParties",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/parties/{partyId}": {
			"patch": {
				"description": "Update party information. Most fields can only be updated before the document is sent.\n\nAfter the document is sent, you can change only `name`, `email`, and `phone`, and only for a party that hasn't signed. Other parties' signatures stay valid. Replacing an email address or phone number issues a new signing link, so the old link stops working, and a party who already got the invitation through that channel gets it again. Any other property returns `409 INVALID_STATE`.\n\nA field you leave out keeps its value. To clear `phone`, `externalId`, `nationalId`, or a key of `company`, pass `null`.\n\n**Updatable Fields:**\n- `name` - Party's full name\n- `email` - Party's email address\n- `phone` - Party's phone number\n- `company` - The company the party signs for: `id` links a company in your workspace, and `name`, `orgNumber`, and `role` describe it. Pass `company: null` to make the party a private individual.\n- `externalId` - Your external reference ID for the party\n- `nationalId` - National identity number, such as a Swedish personnummer, matched against the eID at signing\n- `role` - Party role (SIGNER, ORGANIZER, REVIEWER)\n- `signingOrder` - Order for sequential signing\n- `delivery` - How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"IN_APP\"]` to sign in person on your device, or `[]` to send nothing and share the signing URL yourself\n- `signatureMethod` - How the party signs: `DRAWING`, `SE_BANKID` (Swedish BankID), `CLICK_TO_SIGN`, `MANUAL`, or a national eID scheme. eID schemes are switched on market by market, so call `GET /api/v1/helpers/signature-methods` for the set your account can use\n- `signVerification` - Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the live list\n\n**Restrictions:** Cannot update after party has signed the document.",
				"summary": "Update a party",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "partyId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The party ID.",
						"example": "cm4k2x9p10004abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateParty",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string"
									},
									"email": {
										"type": "string",
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"phone": {
										"description": "Phone number. Pass null to clear it.",
										"type": [
											"string",
											"null"
										]
									},
									"company": {
										"description": "The company the party signs for. A key you leave out keeps its value. Pass null to clear every company field.",
										"type": [
											"object",
											"null"
										],
										"properties": {
											"id": {
												"description": "ID of a company in your workspace to link. Pass null to unlink it.",
												"type": [
													"string",
													"null"
												]
											},
											"name": {
												"description": "Company name. Pass null to clear it.",
												"type": [
													"string",
													"null"
												]
											},
											"orgNumber": {
												"description": "Company organization number. Pass null to clear it.",
												"type": [
													"string",
													"null"
												]
											},
											"role": {
												"description": "The party's role or title at the company. Pass null to clear it.",
												"type": [
													"string",
													"null"
												]
											}
										}
									},
									"externalId": {
										"description": "Your external reference ID for the party. Pass null to clear it.",
										"type": [
											"string",
											"null"
										]
									},
									"nationalId": {
										"description": "National identity number, such as a Swedish personnummer, matched against the eID at signing. Pass null to clear it.",
										"type": [
											"string",
											"null"
										]
									},
									"country": {
										"type": "string",
										"description": "ISO 3166-1 alpha-2 country code of the party, such as SE or DE"
									},
									"role": {
										"type": "string",
										"enum": [
											"SIGNER",
											"ORGANIZER",
											"REVIEWER"
										],
										"description": "Party role: SIGNER, ORGANIZER, or REVIEWER."
									},
									"signingOrder": {
										"type": [
											"number",
											"null"
										]
									},
									"delivery": {
										"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"EMAIL",
												"SMS",
												"IN_APP"
											]
										}
									},
									"signatureMethod": {
										"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. Defaults to the workspace setting.",
										"type": "string",
										"enum": [
											"NONE",
											"DRAWING",
											"SE_BANKID",
											"MANUAL",
											"CLICK_TO_SIGN",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"NO_QES",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											"ZEALID_QES"
										]
									},
									"signVerification": {
										"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"PIN",
											"SMS",
											"EMAIL",
											"SE_BANKID",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											null
										]
									},
									"openVerification": {
										"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"PIN",
											"SMS",
											"EMAIL",
											"SE_BANKID",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											null
										]
									}
								}
							},
							"example": {
								"phone": "+46701740605",
								"delivery": [
									"SMS"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The party ID"
										},
										"documentId": {
											"type": "string",
											"description": "The ID of the document the party belongs to"
										},
										"email": {
											"description": "Signer email address",
											"type": [
												"string",
												"null"
											],
											"format": "email",
											"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
										},
										"name": {
											"type": "string",
											"description": "Signer full name"
										},
										"phone": {
											"description": "Signer phone number (for SMS notifications)",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"INDIVIDUAL",
												"COMPANY"
											],
											"description": "Party type: INDIVIDUAL or COMPANY"
										},
										"company": {
											"description": "The company the party signs for, or null for a private individual",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"description": "ID of the linked company in your workspace",
													"type": [
														"string",
														"null"
													]
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Company organization number",
													"type": [
														"string",
														"null"
													]
												},
												"role": {
													"description": "The party's role or title at the company",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"role"
											],
											"additionalProperties": false
										},
										"externalId": {
											"description": "Your external reference ID for this signer",
											"type": [
												"string",
												"null"
											]
										},
										"contactId": {
											"description": "ID of the contact this party was created from, if any",
											"type": [
												"string",
												"null"
											]
										},
										"nationalId": {
											"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"type": "string",
											"enum": [
												"SIGNER",
												"ORGANIZER",
												"REVIEWER"
											],
											"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
										},
										"signingOrder": {
											"description": "Order for sequential signing (null for parallel)",
											"type": [
												"number",
												"null"
											]
										},
										"signedAt": {
											"description": "Date and time when the signer signed (null if not signed)",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"readStatus": {
											"type": "string",
											"enum": [
												"NOT_OPENED",
												"OPENED",
												"READ"
											],
											"description": "Read status: NOT_OPENED, OPENED, or READ"
										},
										"signingStatus": {
											"type": "string",
											"enum": [
												"NOT_SIGNED",
												"SIGNED",
												"REJECTED"
											],
											"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
										},
										"delivery": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"EMAIL",
													"SMS",
													"IN_APP"
												]
											},
											"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
										},
										"signatureMethod": {
											"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NONE",
												"DRAWING",
												"SE_BANKID",
												"MANUAL",
												"CLICK_TO_SIGN",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"signVerification": {
											"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"openVerification": {
											"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendStatus": {
											"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NOT_SENT",
												"SENT",
												"DELIVERED",
												"BOUNCED",
												"FAILED",
												null
											]
										},
										"signingUrl": {
											"type": "string",
											"description": "Complete signing URL for this signer"
										},
										"identityVerified": {
											"type": "boolean",
											"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
										},
										"identityMismatch": {
											"type": "boolean",
											"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
										},
										"createdAt": {
											"description": "When the party was added to the document",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"email",
										"name",
										"phone",
										"type",
										"company",
										"externalId",
										"contactId",
										"nationalId",
										"country",
										"role",
										"signingOrder",
										"signedAt",
										"readStatus",
										"signingStatus",
										"delivery",
										"signatureMethod",
										"signVerification",
										"openVerification",
										"sendStatus",
										"signingUrl",
										"identityVerified",
										"identityMismatch",
										"createdAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"email": "kai@example.com",
									"name": "Kai Lindqvist",
									"phone": "+46701740605",
									"type": "INDIVIDUAL",
									"company": null,
									"externalId": "HR-2026-0142",
									"contactId": "cm4k2x9p10006abcd1234efgh",
									"nationalId": "191212121212",
									"country": "SE",
									"role": "SIGNER",
									"signingOrder": 1,
									"signedAt": null,
									"readStatus": "NOT_OPENED",
									"signingStatus": "NOT_SIGNED",
									"delivery": [
										"SMS"
									],
									"signatureMethod": "SE_BANKID",
									"signVerification": "PIN",
									"openVerification": "PIN",
									"sendStatus": "NOT_SENT",
									"signingUrl": "https://app.sajn.se/sign/cm4k2x9p10003abcd1234efgh?token=Xk9mQ2vR7tLp4wZs8nYb3",
									"identityVerified": false,
									"identityMismatch": false,
									"createdAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"not_found": {
										"summary": "NOT_FOUND",
										"value": {
											"code": "NOT_FOUND",
											"message": "Party not found",
											"userMessage": "Resursen hittades inte.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
											"resource": "party"
										}
									},
									"partyNotFound": {
										"summary": "NOT_FOUND",
										"value": {
											"code": "NOT_FOUND",
											"message": "Party not found",
											"userMessage": "Parten hittades inte.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
											"resource": "party"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"examples": {
									"invalid_state": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
											"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									},
									"notDraft": {
										"summary": "INVALID_STATE",
										"value": {
											"code": "INVALID_STATE",
											"message": "The document isn't a draft, and editing with resend isn't supported yet",
											"userMessage": "Dokumentet är inte i status 'DRAFT', och redigering med återsändning stöds inte ännu.",
											"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
										}
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Remove a party from a document. You can remove a party from a `DRAFT` document, or from a `PENDING` document if the party hasn't signed.\n\n**Response:** Returns `{ id, deleted: true }`. To keep the party's details, get the party before you remove it.",
				"summary": "Remove a party from document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "partyId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The party ID.",
						"example": "cm4k2x9p10004abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteParty",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the removed party"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the party is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"get": {
				"description": "Retrieve a specific party including their signing URL.\n\n**Security Note:** This endpoint creates an audit log entry each time a signing URL is accessed. Use this endpoint when you need the signing URL to share with the party.\n\n**Response includes:**\n- Party details (name, email, phone, company info)\n- Signing status (NOT_SIGNED, SIGNED, REJECTED)\n- Read status (NOT_OPENED, OPENED, READ)\n- Complete signing URL with token",
				"summary": "Get a party with signing URL",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "partyId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The party ID.",
						"example": "cm4k2x9p10004abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getParty",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The party ID"
										},
										"documentId": {
											"type": "string",
											"description": "The ID of the document the party belongs to"
										},
										"email": {
											"description": "Signer email address",
											"type": [
												"string",
												"null"
											],
											"format": "email",
											"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
										},
										"name": {
											"type": "string",
											"description": "Signer full name"
										},
										"phone": {
											"description": "Signer phone number (for SMS notifications)",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"INDIVIDUAL",
												"COMPANY"
											],
											"description": "Party type: INDIVIDUAL or COMPANY"
										},
										"company": {
											"description": "The company the party signs for, or null for a private individual",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"description": "ID of the linked company in your workspace",
													"type": [
														"string",
														"null"
													]
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Company organization number",
													"type": [
														"string",
														"null"
													]
												},
												"role": {
													"description": "The party's role or title at the company",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"role"
											],
											"additionalProperties": false
										},
										"externalId": {
											"description": "Your external reference ID for this signer",
											"type": [
												"string",
												"null"
											]
										},
										"contactId": {
											"description": "ID of the contact this party was created from, if any",
											"type": [
												"string",
												"null"
											]
										},
										"nationalId": {
											"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"type": "string",
											"enum": [
												"SIGNER",
												"ORGANIZER",
												"REVIEWER"
											],
											"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
										},
										"signingOrder": {
											"description": "Order for sequential signing (null for parallel)",
											"type": [
												"number",
												"null"
											]
										},
										"signedAt": {
											"description": "Date and time when the signer signed (null if not signed)",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"readStatus": {
											"type": "string",
											"enum": [
												"NOT_OPENED",
												"OPENED",
												"READ"
											],
											"description": "Read status: NOT_OPENED, OPENED, or READ"
										},
										"signingStatus": {
											"type": "string",
											"enum": [
												"NOT_SIGNED",
												"SIGNED",
												"REJECTED"
											],
											"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
										},
										"delivery": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"EMAIL",
													"SMS",
													"IN_APP"
												]
											},
											"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
										},
										"signatureMethod": {
											"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NONE",
												"DRAWING",
												"SE_BANKID",
												"MANUAL",
												"CLICK_TO_SIGN",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"signVerification": {
											"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"openVerification": {
											"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"sendStatus": {
											"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NOT_SENT",
												"SENT",
												"DELIVERED",
												"BOUNCED",
												"FAILED",
												null
											]
										},
										"signingUrl": {
											"type": "string",
											"description": "Complete signing URL for this signer"
										},
										"identityVerified": {
											"type": "boolean",
											"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
										},
										"identityMismatch": {
											"type": "boolean",
											"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
										},
										"createdAt": {
											"description": "When the party was added to the document",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"email",
										"name",
										"phone",
										"type",
										"company",
										"externalId",
										"contactId",
										"nationalId",
										"country",
										"role",
										"signingOrder",
										"signedAt",
										"readStatus",
										"signingStatus",
										"delivery",
										"signatureMethod",
										"signVerification",
										"openVerification",
										"sendStatus",
										"signingUrl",
										"identityVerified",
										"identityMismatch",
										"createdAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"email": "kai@example.com",
									"name": "Kai Lindqvist",
									"phone": "+46701740605",
									"type": "INDIVIDUAL",
									"company": null,
									"externalId": "HR-2026-0142",
									"contactId": "cm4k2x9p10006abcd1234efgh",
									"nationalId": "191212121212",
									"country": "SE",
									"role": "SIGNER",
									"signingOrder": 1,
									"signedAt": "2026-09-29T07:41:00.000Z",
									"readStatus": "READ",
									"signingStatus": "SIGNED",
									"delivery": [
										"EMAIL"
									],
									"signatureMethod": "SE_BANKID",
									"signVerification": "PIN",
									"openVerification": "PIN",
									"sendStatus": "DELIVERED",
									"signingUrl": "https://app.sajn.se/sign/cm4k2x9p10003abcd1234efgh?token=Xk9mQ2vR7tLp4wZs8nYb3",
									"identityVerified": true,
									"identityMismatch": false,
									"createdAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/contacts": {
			"get": {
				"description": "Retrieve a paginated list of all contacts in your organization.\n\nContacts are individuals that can be added as signers to documents. Each contact can optionally be associated with a company.\n\n**Filters:** `email`, `phone` and `externalId` match exactly. Every filter you pass must match.\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.",
				"summary": "List all contacts",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "query",
						"in": "query",
						"description": "Free-text search across first name, last name, email, phone, and company",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "email",
						"in": "query",
						"description": "Returns only contacts whose email address equals this value exactly.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "phone",
						"in": "query",
						"description": "Returns only contacts whose phone number equals this value exactly. Encode a leading `+` as `%2B`.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "externalId",
						"in": "query",
						"description": "Returns only the contact whose `externalId` equals this value exactly.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "companyId",
						"in": "query",
						"description": "Filter by one or more company IDs. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "tagId",
						"in": "query",
						"description": "Filter by one or more tag IDs. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only contacts created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only contacts created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only contacts updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only contacts updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getContacts",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique contact identifier"
													},
													"email": {
														"description": "Contact email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Contact phone number",
														"type": [
															"string",
															"null"
														]
													},
													"firstName": {
														"type": "string",
														"description": "Contact first name"
													},
													"lastName": {
														"type": "string",
														"description": "Contact last name"
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"externalId": {
														"description": "Your external reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"addressLine1": {
														"description": "First line of the street address",
														"type": [
															"string",
															"null"
														]
													},
													"addressLine2": {
														"description": "Second line of the street address, such as a c/o line",
														"type": [
															"string",
															"null"
														]
													},
													"postalCode": {
														"description": "Postal code of the address",
														"type": [
															"string",
															"null"
														]
													},
													"city": {
														"description": "City of the address",
														"type": [
															"string",
															"null"
														]
													},
													"state": {
														"description": "State or region of the address",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "Country of the address, as free text, as it was entered or imported. It isn't a country code, unlike a party's `country`.",
														"type": [
															"string",
															"null"
														]
													},
													"createdAt": {
														"description": "Date and time when contact was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when contact was last updated",
														"type": "string",
														"format": "date-time"
													},
													"companyRole": {
														"description": "Role/title within the associated company",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the contact belongs to",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "Unique company identifier"
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Organization number, without a hyphen",
																"type": [
																	"string",
																	"null"
																]
															},
															"country": {
																"description": "Country code of the company, such as SE",
																"type": [
																	"string",
																	"null"
																]
															},
															"createdAt": {
																"description": "Date and time when the company was created",
																"type": "string",
																"format": "date-time"
															},
															"updatedAt": {
																"description": "Date and time when the company was last updated",
																"type": "string",
																"format": "date-time"
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"country",
															"createdAt",
															"updatedAt"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"id",
													"email",
													"phone",
													"firstName",
													"lastName",
													"nationalId",
													"externalId",
													"addressLine1",
													"addressLine2",
													"postalCode",
													"city",
													"state",
													"country",
													"createdAt",
													"updatedAt",
													"companyRole",
													"company"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10006abcd1234efgh",
													"email": "kai@example.com",
													"phone": "+46701740605",
													"firstName": "Kai",
													"lastName": "Lindqvist",
													"nationalId": "191212121212",
													"externalId": "EMP-0142",
													"addressLine1": "Storgatan 12",
													"addressLine2": null,
													"postalCode": "411 38",
													"city": "Göteborg",
													"state": null,
													"country": "Sverige",
													"createdAt": "2026-09-15T10:30:00.000Z",
													"updatedAt": "2026-09-15T10:30:00.000Z",
													"companyRole": null,
													"company": null
												}
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10006abcd1234efgh",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"firstName": "Kai",
											"lastName": "Lindqvist",
											"nationalId": "191212121212",
											"externalId": "EMP-0142",
											"addressLine1": "Storgatan 12",
											"addressLine2": null,
											"postalCode": "411 38",
											"city": "Göteborg",
											"state": null,
											"country": "Sverige",
											"createdAt": "2026-09-15T10:30:00.000Z",
											"updatedAt": "2026-09-15T10:30:00.000Z",
											"companyRole": null,
											"company": null
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Contact not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "contact"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new contact in your organization.\n\n**Required Fields:**\n- `firstName` - Contact's first name\n\n**Optional Fields:**\n- `lastName` - Contact's last name (omit or send an empty string for single-name contacts)\n- `email` - Email address\n- `phone` - Phone number (for SMS notifications)\n- `nationalId` - National identity number, such as a Swedish personnummer, for eID verification\n- `externalId` - Your external reference ID for tracking\n- `companyId` - Associate with existing company\n- `companyRole` - Role within the company\n- `addressLine1`, `addressLine2`, `postalCode`, `city`, `state`, `country` - The contact's address",
				"summary": "Create a new contact",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createContact",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"firstName": {
										"type": "string",
										"minLength": 1,
										"description": "Contact first name (required)"
									},
									"lastName": {
										"description": "Contact last name (optional, e.g. for single-name contacts)",
										"type": "string"
									},
									"email": {
										"description": "Contact email address",
										"type": "string",
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"phone": {
										"description": "Contact phone number",
										"type": "string"
									},
									"externalId": {
										"description": "Your external reference ID for this contact",
										"type": "string"
									},
									"companyId": {
										"description": "ID of company to associate with",
										"type": "string"
									},
									"companyRole": {
										"description": "Role/title within the company",
										"type": "string"
									},
									"nationalId": {
										"description": "National identity number, such as a Swedish personnummer",
										"type": "string"
									},
									"addressLine1": {
										"description": "First line of the street address",
										"type": [
											"string",
											"null"
										]
									},
									"addressLine2": {
										"description": "Second line of the street address, such as a c/o line",
										"type": [
											"string",
											"null"
										]
									},
									"postalCode": {
										"description": "Postal code of the address",
										"type": [
											"string",
											"null"
										]
									},
									"city": {
										"description": "City of the address",
										"type": [
											"string",
											"null"
										]
									},
									"state": {
										"description": "State or region of the address",
										"type": [
											"string",
											"null"
										]
									},
									"country": {
										"description": "Country of the address, as free text, such as Sverige. It isn't validated as a country code.",
										"type": [
											"string",
											"null"
										]
									}
								},
								"required": [
									"firstName"
								],
								"description": "Create contact request"
							},
							"example": {
								"firstName": "Kai",
								"lastName": "Lindqvist",
								"email": "kai@example.com",
								"phone": "+46701740605",
								"externalId": "EMP-0142"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique contact identifier"
										},
										"email": {
											"description": "Contact email address",
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"description": "Contact phone number",
											"type": [
												"string",
												"null"
											]
										},
										"firstName": {
											"type": "string",
											"description": "Contact first name"
										},
										"lastName": {
											"type": "string",
											"description": "Contact last name"
										},
										"nationalId": {
											"description": "National identity number, such as a Swedish personnummer",
											"type": [
												"string",
												"null"
											]
										},
										"externalId": {
											"description": "Your external reference ID",
											"type": [
												"string",
												"null"
											]
										},
										"addressLine1": {
											"description": "First line of the street address",
											"type": [
												"string",
												"null"
											]
										},
										"addressLine2": {
											"description": "Second line of the street address, such as a c/o line",
											"type": [
												"string",
												"null"
											]
										},
										"postalCode": {
											"description": "Postal code of the address",
											"type": [
												"string",
												"null"
											]
										},
										"city": {
											"description": "City of the address",
											"type": [
												"string",
												"null"
											]
										},
										"state": {
											"description": "State or region of the address",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "Country of the address, as free text, as it was entered or imported. It isn't a country code, unlike a party's `country`.",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"description": "Date and time when contact was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when contact was last updated",
											"type": "string",
											"format": "date-time"
										},
										"companyRole": {
											"description": "Role/title within the associated company",
											"type": [
												"string",
												"null"
											]
										},
										"company": {
											"description": "The company the contact belongs to",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "Unique company identifier"
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Organization number, without a hyphen",
													"type": [
														"string",
														"null"
													]
												},
												"country": {
													"description": "Country code of the company, such as SE",
													"type": [
														"string",
														"null"
													]
												},
												"createdAt": {
													"description": "Date and time when the company was created",
													"type": "string",
													"format": "date-time"
												},
												"updatedAt": {
													"description": "Date and time when the company was last updated",
													"type": "string",
													"format": "date-time"
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"country",
												"createdAt",
												"updatedAt"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"email",
										"phone",
										"firstName",
										"lastName",
										"nationalId",
										"externalId",
										"addressLine1",
										"addressLine2",
										"postalCode",
										"city",
										"state",
										"country",
										"createdAt",
										"updatedAt",
										"companyRole",
										"company"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"email": "kai@example.com",
										"phone": "+46701740605",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"nationalId": "191212121212",
										"externalId": "EMP-0142",
										"addressLine1": "Storgatan 12",
										"addressLine2": null,
										"postalCode": "411 38",
										"city": "Göteborg",
										"state": null,
										"country": "Sverige",
										"createdAt": "2026-09-15T10:30:00.000Z",
										"updatedAt": "2026-09-15T10:30:00.000Z",
										"companyRole": null,
										"company": null
									}
								},
								"example": {
									"id": "cm4k2x9p10006abcd1234efgh",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"firstName": "Kai",
									"lastName": "Lindqvist",
									"nationalId": "191212121212",
									"externalId": "EMP-0142",
									"addressLine1": "Storgatan 12",
									"addressLine2": null,
									"postalCode": "411 38",
									"city": "Göteborg",
									"state": null,
									"country": "Sverige",
									"createdAt": "2026-09-15T10:30:00.000Z",
									"updatedAt": "2026-09-15T10:30:00.000Z",
									"companyRole": null,
									"company": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "firstName",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Contact not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "contact"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:write"
						]
					}
				]
			}
		},
		"/api/v1/contacts/{id}": {
			"get": {
				"description": "Retrieve detailed information about a specific contact including associated company information.",
				"summary": "Get a contact by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The contact ID.",
						"example": "cm4k2x9p10006abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getContact",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique contact identifier"
										},
										"email": {
											"description": "Contact email address",
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"description": "Contact phone number",
											"type": [
												"string",
												"null"
											]
										},
										"firstName": {
											"type": "string",
											"description": "Contact first name"
										},
										"lastName": {
											"type": "string",
											"description": "Contact last name"
										},
										"nationalId": {
											"description": "National identity number, such as a Swedish personnummer",
											"type": [
												"string",
												"null"
											]
										},
										"externalId": {
											"description": "Your external reference ID",
											"type": [
												"string",
												"null"
											]
										},
										"addressLine1": {
											"description": "First line of the street address",
											"type": [
												"string",
												"null"
											]
										},
										"addressLine2": {
											"description": "Second line of the street address, such as a c/o line",
											"type": [
												"string",
												"null"
											]
										},
										"postalCode": {
											"description": "Postal code of the address",
											"type": [
												"string",
												"null"
											]
										},
										"city": {
											"description": "City of the address",
											"type": [
												"string",
												"null"
											]
										},
										"state": {
											"description": "State or region of the address",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "Country of the address, as free text, as it was entered or imported. It isn't a country code, unlike a party's `country`.",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"description": "Date and time when contact was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when contact was last updated",
											"type": "string",
											"format": "date-time"
										},
										"companyRole": {
											"description": "Role/title within the associated company",
											"type": [
												"string",
												"null"
											]
										},
										"company": {
											"description": "The company the contact belongs to",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "Unique company identifier"
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Organization number, without a hyphen",
													"type": [
														"string",
														"null"
													]
												},
												"country": {
													"description": "Country code of the company, such as SE",
													"type": [
														"string",
														"null"
													]
												},
												"createdAt": {
													"description": "Date and time when the company was created",
													"type": "string",
													"format": "date-time"
												},
												"updatedAt": {
													"description": "Date and time when the company was last updated",
													"type": "string",
													"format": "date-time"
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"country",
												"createdAt",
												"updatedAt"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"email",
										"phone",
										"firstName",
										"lastName",
										"nationalId",
										"externalId",
										"addressLine1",
										"addressLine2",
										"postalCode",
										"city",
										"state",
										"country",
										"createdAt",
										"updatedAt",
										"companyRole",
										"company"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"email": "kai@example.com",
										"phone": "+46701740605",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"nationalId": "191212121212",
										"externalId": "EMP-0142",
										"addressLine1": "Storgatan 12",
										"addressLine2": null,
										"postalCode": "411 38",
										"city": "Göteborg",
										"state": null,
										"country": "Sverige",
										"createdAt": "2026-09-15T10:30:00.000Z",
										"updatedAt": "2026-09-15T10:30:00.000Z",
										"companyRole": null,
										"company": null
									}
								},
								"example": {
									"id": "cm4k2x9p10006abcd1234efgh",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"firstName": "Kai",
									"lastName": "Lindqvist",
									"nationalId": "191212121212",
									"externalId": "EMP-0142",
									"addressLine1": "Storgatan 12",
									"addressLine2": null,
									"postalCode": "411 38",
									"city": "Göteborg",
									"state": null,
									"country": "Sverige",
									"createdAt": "2026-09-15T10:30:00.000Z",
									"updatedAt": "2026-09-15T10:30:00.000Z",
									"companyRole": null,
									"company": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Contact not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "contact"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:read"
						]
					}
				]
			},
			"patch": {
				"description": "Update contact information. Omit a field to keep its value, or pass `null` to clear it.\n\nUpdating a contact doesn't change the parties of existing documents. Changes apply only to new documents.",
				"summary": "Update a contact",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The contact ID.",
						"example": "cm4k2x9p10006abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateContact",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"firstName": {
										"description": "Contact first name",
										"type": "string"
									},
									"lastName": {
										"description": "Contact last name",
										"type": "string"
									},
									"email": {
										"description": "Contact email address. Pass null to remove it.",
										"type": [
											"string",
											"null"
										],
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"phone": {
										"description": "Contact phone number. Pass null to remove it.",
										"type": [
											"string",
											"null"
										]
									},
									"nationalId": {
										"description": "National identity number, such as a Swedish personnummer. Pass null to remove it.",
										"type": [
											"string",
											"null"
										]
									},
									"externalId": {
										"description": "Your external reference ID. Pass null to remove it.",
										"type": [
											"string",
											"null"
										]
									},
									"companyId": {
										"description": "ID of company to associate with. Omit to keep the current company, or pass null to unlink it.",
										"type": [
											"string",
											"null"
										]
									},
									"companyRole": {
										"description": "Role/title within the company. Pass null to remove it.",
										"type": [
											"string",
											"null"
										]
									},
									"addressLine1": {
										"description": "First line of the street address",
										"type": [
											"string",
											"null"
										]
									},
									"addressLine2": {
										"description": "Second line of the street address, such as a c/o line",
										"type": [
											"string",
											"null"
										]
									},
									"postalCode": {
										"description": "Postal code of the address",
										"type": [
											"string",
											"null"
										]
									},
									"city": {
										"description": "City of the address",
										"type": [
											"string",
											"null"
										]
									},
									"state": {
										"description": "State or region of the address",
										"type": [
											"string",
											"null"
										]
									},
									"country": {
										"description": "Country of the address, as free text, such as Sverige. It isn't validated as a country code.",
										"type": [
											"string",
											"null"
										]
									}
								},
								"description": "Update contact request. Omit a field to keep it, or pass null to clear it."
							},
							"example": {
								"phone": "+46701740605"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique contact identifier"
										},
										"email": {
											"description": "Contact email address",
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"description": "Contact phone number",
											"type": [
												"string",
												"null"
											]
										},
										"firstName": {
											"type": "string",
											"description": "Contact first name"
										},
										"lastName": {
											"type": "string",
											"description": "Contact last name"
										},
										"nationalId": {
											"description": "National identity number, such as a Swedish personnummer",
											"type": [
												"string",
												"null"
											]
										},
										"externalId": {
											"description": "Your external reference ID",
											"type": [
												"string",
												"null"
											]
										},
										"addressLine1": {
											"description": "First line of the street address",
											"type": [
												"string",
												"null"
											]
										},
										"addressLine2": {
											"description": "Second line of the street address, such as a c/o line",
											"type": [
												"string",
												"null"
											]
										},
										"postalCode": {
											"description": "Postal code of the address",
											"type": [
												"string",
												"null"
											]
										},
										"city": {
											"description": "City of the address",
											"type": [
												"string",
												"null"
											]
										},
										"state": {
											"description": "State or region of the address",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "Country of the address, as free text, as it was entered or imported. It isn't a country code, unlike a party's `country`.",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"description": "Date and time when contact was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when contact was last updated",
											"type": "string",
											"format": "date-time"
										},
										"companyRole": {
											"description": "Role/title within the associated company",
											"type": [
												"string",
												"null"
											]
										},
										"company": {
											"description": "The company the contact belongs to",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "Unique company identifier"
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Organization number, without a hyphen",
													"type": [
														"string",
														"null"
													]
												},
												"country": {
													"description": "Country code of the company, such as SE",
													"type": [
														"string",
														"null"
													]
												},
												"createdAt": {
													"description": "Date and time when the company was created",
													"type": "string",
													"format": "date-time"
												},
												"updatedAt": {
													"description": "Date and time when the company was last updated",
													"type": "string",
													"format": "date-time"
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"country",
												"createdAt",
												"updatedAt"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"email",
										"phone",
										"firstName",
										"lastName",
										"nationalId",
										"externalId",
										"addressLine1",
										"addressLine2",
										"postalCode",
										"city",
										"state",
										"country",
										"createdAt",
										"updatedAt",
										"companyRole",
										"company"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"email": "kai@example.com",
										"phone": "+46701740605",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"nationalId": "191212121212",
										"externalId": "EMP-0142",
										"addressLine1": "Storgatan 12",
										"addressLine2": null,
										"postalCode": "411 38",
										"city": "Göteborg",
										"state": null,
										"country": "Sverige",
										"createdAt": "2026-09-15T10:30:00.000Z",
										"updatedAt": "2026-09-15T10:30:00.000Z",
										"companyRole": null,
										"company": null
									}
								},
								"example": {
									"id": "cm4k2x9p10006abcd1234efgh",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"firstName": "Kai",
									"lastName": "Lindqvist",
									"nationalId": "191212121212",
									"externalId": "EMP-0142",
									"addressLine1": "Storgatan 12",
									"addressLine2": null,
									"postalCode": "411 38",
									"city": "Göteborg",
									"state": null,
									"country": "Sverige",
									"createdAt": "2026-09-15T10:30:00.000Z",
									"updatedAt": "2026-09-15T10:30:00.000Z",
									"companyRole": null,
									"company": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "firstName",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Contact not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "contact"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:write"
						]
					}
				]
			},
			"delete": {
				"description": "Permanently delete a contact. Existing document signers are unaffected — they keep their own name/email snapshot and are unlinked from the contact rather than removed, so past and in-flight documents stay intact.",
				"summary": "Delete a contact",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The contact ID.",
						"example": "cm4k2x9p10006abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteContact",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted contact"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the contact is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10006abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Contact not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "contact"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:delete"
						]
					}
				]
			}
		},
		"/api/v1/companies": {
			"get": {
				"description": "Retrieve a paginated list of the companies in your workspace, newest first.\n\nCompanies can be associated with contacts to track organizational relationships.\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.\n**Search:** Use `query` to match part of the company name or organization number, or `orgNumber` and `name` for an exact match. Every filter you pass must match.",
				"summary": "List companies",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "query",
						"in": "query",
						"description": "Free-text search across company name and organization number",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "orgNumber",
						"in": "query",
						"description": "Returns only the company whose organization number equals this value. A hyphen is ignored.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "name",
						"in": "query",
						"description": "Returns only companies whose name equals this value, ignoring case.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only companies created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only companies created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only companies updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only companies updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getCompanies",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique company identifier"
													},
													"name": {
														"description": "Company name",
														"type": [
															"string",
															"null"
														]
													},
													"orgNumber": {
														"description": "Organization number, without a hyphen",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "Country code of the company, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"createdAt": {
														"description": "Date and time when the company was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the company was last updated",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"name",
													"orgNumber",
													"country",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10007abcd1234efgh",
											"name": "Nordljus AB",
											"orgNumber": "5566778899",
											"country": "SE",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new company in your organization.\n\n**Required Fields:**\n- `name` - Company name\n\n**Optional Fields:**\n- `orgNumber` - Organization number (must be unique if provided)\n- `country` - Country code, defaults to `SE`\n\n**Note:** If a company with the same organization number exists, a 409 Conflict error is returned.",
				"summary": "Create a new company",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createCompany",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1
									},
									"orgNumber": {
										"type": "string"
									},
									"country": {
										"type": "string"
									}
								},
								"required": [
									"name"
								]
							},
							"example": {
								"name": "Nordljus AB",
								"orgNumber": "5566778899",
								"country": "SE"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique company identifier"
										},
										"name": {
											"description": "Company name",
											"type": [
												"string",
												"null"
											]
										},
										"orgNumber": {
											"description": "Organization number, without a hyphen",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "Country code of the company, such as SE",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"description": "Date and time when the company was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the company was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"orgNumber",
										"country",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10007abcd1234efgh",
									"name": "Nordljus AB",
									"orgNumber": "5566778899",
									"country": "SE",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:write"
						]
					}
				]
			}
		},
		"/api/v1/companies/{id}": {
			"get": {
				"description": "Retrieve a company. To list its contacts, call `GET /api/v1/contacts?companyId=` with the company ID.",
				"summary": "Get a company by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The company ID.",
						"example": "cm4k2x9p10007abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getCompany",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique company identifier"
										},
										"name": {
											"description": "Company name",
											"type": [
												"string",
												"null"
											]
										},
										"orgNumber": {
											"description": "Organization number, without a hyphen",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "Country code of the company, such as SE",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"description": "Date and time when the company was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the company was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"orgNumber",
										"country",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10007abcd1234efgh",
									"name": "Nordljus AB",
									"orgNumber": "5566778899",
									"country": "SE",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Company not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "company"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:read"
						]
					}
				]
			}
		},
		"/api/v1/company-registry/{orgNumber}": {
			"get": {
				"description": "Look up a company in the external company registry by organization number, including its signatories. This searches the registry, not the companies in your workspace. Results are cached for 3 days.\n\n**Response includes:**\n- Basic company info (name, status, organization number)\n- Contact information (phone, address)\n- Legal information (company form, domicile, registration dates)\n- Tax information (VAT registration, verified against the EU VIES registry; `employer` and `fTax` aren't populated)\n- Business info (SNI codes, activity description, company signature)\n- Responsible persons (executives, board members, auditors, owners)\n- Location coordinates",
				"summary": "Look up a company in the company registry",
				"parameters": [
					{
						"name": "orgNumber",
						"in": "path",
						"description": "Organization number of the company, with or without a hyphen",
						"required": true,
						"schema": {
							"type": "string",
							"minLength": 1,
							"example": "5560000000"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getCompanyRegistryEntry",
				"responses": {
					"200": {
						"description": "Company details from the external company registry, including signatories",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"basic": {
											"type": "object",
											"properties": {
												"name": {
													"type": "string"
												},
												"orgNumber": {
													"type": "string"
												},
												"lastUpdated": {
													"type": "string"
												},
												"status": {
													"type": "string"
												}
											},
											"required": [
												"name",
												"orgNumber",
												"lastUpdated",
												"status"
											],
											"additionalProperties": false
										},
										"contact": {
											"type": "object",
											"properties": {
												"phoneNumbers": {
													"type": "array",
													"items": {
														"type": "string"
													}
												},
												"address": {
													"type": "object",
													"properties": {
														"careOf": {
															"type": [
																"string",
																"null"
															]
														},
														"street": {
															"type": "string"
														},
														"postalCode": {
															"type": "string"
														},
														"city": {
															"type": "string"
														}
													},
													"required": [
														"careOf",
														"street",
														"postalCode",
														"city"
													],
													"additionalProperties": false
												}
											},
											"required": [
												"phoneNumbers",
												"address"
											],
											"additionalProperties": false
										},
										"legalInfo": {
											"type": "object",
											"properties": {
												"orgNumber": {
													"type": "string"
												},
												"companyName": {
													"type": "string"
												},
												"companyForm": {
													"type": "string"
												},
												"domicile": {
													"type": "string"
												},
												"registration": {
													"type": "object",
													"properties": {
														"companyFormed": {
															"type": "string"
														},
														"companyRegistered": {
															"type": "string"
														},
														"registrationDate": {
															"type": "string"
														},
														"articlesOfAssociation": {
															"type": "string"
														}
													},
													"required": [
														"companyFormed",
														"companyRegistered",
														"registrationDate",
														"articlesOfAssociation"
													],
													"additionalProperties": false
												}
											},
											"required": [
												"orgNumber",
												"companyName",
												"companyForm",
												"domicile",
												"registration"
											],
											"additionalProperties": false
										},
										"taxInfo": {
											"type": "object",
											"properties": {
												"employer": {
													"type": "string"
												},
												"fTax": {
													"type": "string"
												},
												"vat": {
													"type": "string"
												},
												"vatNumber": {
													"type": "string"
												}
											},
											"required": [
												"employer",
												"fTax",
												"vat",
												"vatNumber"
											],
											"additionalProperties": false
										},
										"business": {
											"type": "object",
											"properties": {
												"sni": {
													"type": "array",
													"items": {}
												},
												"activityDescription": {
													"type": "string"
												},
												"companySignature": {
													"type": "string"
												}
											},
											"required": [
												"sni",
												"activityDescription",
												"companySignature"
											],
											"additionalProperties": false
										},
										"responsiblePersons": {
											"type": "object",
											"properties": {
												"executives": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"name": {
																"type": "string"
															},
															"role": {
																"type": "string"
															},
															"personId": {
																"type": "string"
															},
															"age": {
																"type": [
																	"number",
																	"null"
																]
															},
															"personUrl": {
																"type": "string"
															}
														},
														"required": [
															"name",
															"role",
															"personId",
															"age",
															"personUrl"
														],
														"additionalProperties": false
													}
												},
												"board": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"name": {
																"type": "string"
															},
															"role": {
																"type": "string"
															},
															"personId": {
																"type": "string"
															},
															"age": {
																"type": [
																	"number",
																	"null"
																]
															},
															"personUrl": {
																"type": "string"
															}
														},
														"required": [
															"name",
															"role",
															"personId",
															"age",
															"personUrl"
														],
														"additionalProperties": false
													}
												},
												"auditors": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"name": {
																"type": "string"
															},
															"role": {
																"type": "string"
															},
															"personId": {
																"type": "string"
															},
															"age": {
																"type": [
																	"number",
																	"null"
																]
															},
															"personUrl": {
																"type": "string"
															}
														},
														"required": [
															"name",
															"role",
															"personId",
															"age",
															"personUrl"
														],
														"additionalProperties": false
													}
												},
												"owners": {
													"type": "array",
													"items": {
														"type": "object",
														"properties": {
															"name": {
																"type": "string"
															},
															"personId": {
																"type": "string"
															},
															"age": {
																"type": [
																	"number",
																	"null"
																]
															},
															"role": {
																"type": [
																	"string",
																	"null"
																]
															},
															"control": {
																"type": "string"
															},
															"personUrl": {
																"type": "string"
															}
														},
														"required": [
															"name",
															"personId",
															"age",
															"role",
															"personUrl"
														],
														"additionalProperties": false
													}
												}
											},
											"required": [
												"executives",
												"board",
												"auditors",
												"owners"
											],
											"additionalProperties": false
										},
										"location": {
											"type": "object",
											"properties": {
												"latitude": {
													"type": "number"
												},
												"longitude": {
													"type": "number"
												}
											},
											"required": [
												"latitude",
												"longitude"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"basic",
										"contact",
										"legalInfo",
										"taxInfo",
										"business",
										"responsiblePersons",
										"location"
									],
									"additionalProperties": false,
									"description": "Company details from the external company registry, including signatories"
								},
								"example": {
									"basic": {
										"name": "Anställningsavtal – Kai Lindqvist",
										"orgNumber": "5566778899",
										"lastUpdated": "2026-09-28T09:15:00.000Z",
										"status": "COMPLETED"
									},
									"contact": {
										"phoneNumbers": [
											"+46851234567"
										],
										"address": {
											"careOf": "",
											"street": "Exempelgatan 1",
											"postalCode": "11122",
											"city": "Stockholm"
										}
									},
									"legalInfo": {
										"orgNumber": "5566778899",
										"companyName": "Nordljus AB",
										"companyForm": "Aktiebolag",
										"domicile": "Stockholm",
										"registration": {
											"companyFormed": "2012-03-01",
											"companyRegistered": "2012-03-15",
											"registrationDate": "2012-03-15",
											"articlesOfAssociation": "2012-03-01"
										}
									},
									"taxInfo": {
										"employer": "Ja",
										"fTax": "Ja",
										"vat": "Ja",
										"vatNumber": "SE556677889901"
									},
									"business": {
										"sni": [
											{
												"code": "70220",
												"description": "Konsultverksamhet avseende företags organisation"
											}
										],
										"activityDescription": "Konsultverksamhet inom HR och rekrytering.",
										"companySignature": "Styrelsen"
									},
									"responsiblePersons": {
										"executives": [
											{
												"name": "Kim Nordin",
												"role": "Styrelseledamot",
												"personId": "cm4k2x9p10043abcd1234efgh",
												"age": 46,
												"personUrl": "https://example.com/personer/kai-lindqvist"
											}
										],
										"board": [
											{
												"name": "Kim Nordin",
												"role": "Styrelseledamot",
												"personId": "cm4k2x9p10043abcd1234efgh",
												"age": 46,
												"personUrl": "https://example.com/personer/kai-lindqvist"
											}
										],
										"auditors": [
											{
												"name": "Kim Nordin",
												"role": "Styrelseledamot",
												"personId": "cm4k2x9p10043abcd1234efgh",
												"age": 46,
												"personUrl": "https://example.com/personer/kai-lindqvist"
											}
										],
										"owners": [
											{
												"name": "Kim Nordin",
												"personId": "cm4k2x9p10043abcd1234efgh",
												"age": 46,
												"role": "Styrelseledamot",
												"control": "Mer än 25 %",
												"personUrl": "https://example.com/personer/kai-lindqvist"
											}
										]
									},
									"location": {
										"latitude": 59.3326,
										"longitude": 18.0649
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires contacts:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"contacts:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"contacts:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/field-values": {
			"get": {
				"description": "Lists every value that the sender or a party can fill in on a document, addressed by one `key` each. The list covers FORM subfields, form fields that are part of an uploaded PDF (AcroForm fields), and input boxes placed on a PDF.\n\nThe values are in `data`. To fill in values, send the keys to `PATCH /api/v1/documents/{id}/field-values`.",
				"summary": "List the fillable values on a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "onlyEmpty",
						"in": "query",
						"description": "If `true`, returns only the values that are empty.",
						"schema": {
							"type": "boolean"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFieldValues",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string",
														"description": "The key you send to fill in this value. For a FORM subfield or a placed box, this is the key set in the editor, or the element ID when no key is set. For an AcroForm field, this is the field name in the PDF."
													},
													"label": {
														"type": "string",
														"description": "The label shown to the sender or party."
													},
													"kind": {
														"type": "string",
														"enum": [
															"FORM",
															"PDF_ACROFORM",
															"PDF_PLACED",
															"INLINE"
														],
														"description": "Where the value lives: a FORM subfield, a form field that is part of the uploaded PDF, or a box placed on the PDF."
													},
													"fieldId": {
														"type": "string",
														"description": "The ID of the document field that holds this value. For an AcroForm field that spans several page fields, the first of them."
													},
													"type": {
														"type": "string",
														"description": "The input type: a FORM subfield type such as `INPUT`, `DATEPICKER`, or `CHECKBOX`, an AcroForm field type such as `TEXT` or `DROPDOWN`, or a box input type such as `DATE`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. A value outside this list is rejected. Null when any value is allowed.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													},
													"value": {
														"anyOf": [
															{
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "boolean"
																	},
																	{
																		"type": "array",
																		"items": {
																			"type": "string"
																		}
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "The current value, or `null` if the value is empty. A FORM `CHECKBOX` holds a list of the selected options, and a PDF checkbox holds a boolean."
													},
													"filledBy": {
														"type": "string",
														"enum": [
															"SENDER",
															"SIGNER"
														],
														"description": "If `SENDER`, you can write the value. If `SIGNER`, the party fills in the value when signing, and the value is read-only."
													},
													"partyId": {
														"description": "The ID of the party that fills in the value when `filledBy` is `SIGNER`.",
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"key",
													"label",
													"kind",
													"fieldId",
													"type",
													"required",
													"options",
													"value",
													"filledBy",
													"partyId"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"kind": "FORM",
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"type": "Anställningsavtal – Kai Lindqvist",
											"required": true,
											"options": [
												"Heltid"
											],
											"value": "540000",
											"filledBy": "SENDER",
											"partyId": "cm4k2x9p10004abcd1234efgh"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"patch": {
				"description": "Fills in values by key. The same request shape works for FORM subfields, AcroForm fields, and boxes placed on a PDF. Only documents with the status DRAFT or IMPORTED can be filled in.\n\nKeys must match exactly. To find the keys, call `GET /api/v1/documents/{id}/field-values`. Set a key in the editor on a FORM subfield or a placed box, or send `key` when you create a placed box through the API, so that the key stays the same for every document created from a template.\n\nThe following example fills in a FORM subfield, a placed text box, and a PDF checkbox:\n\n```json\n{\n  \"values\": [\n    { \"key\": \"customer-name\", \"value\": \"Example AB\" },\n    { \"key\": \"org-number\", \"value\": \"556000-0000\" },\n    { \"key\": \"accept-terms\", \"value\": true }\n  ]\n}\n```\n\nA value fails, and the other values are still written, when its key doesn't exist, when two fields share the key, when a party fills in the value and the document is no longer a draft, or when the value doesn't match the type or the allowed options. `results` lists the outcome for each key, with an `error` that has a `code` from the error catalogue, and `data` holds every value on the document after the write, as `GET /api/v1/documents/{id}/field-values` returns them.\n\nIf another edit changes one of the fields while the request runs, nothing is written and the request fails with an HTTP `409 Conflict` status code. Send the request again.",
				"summary": "Fill in values on a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "setFieldValues",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"values": {
										"minItems": 1,
										"maxItems": 100,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"key": {
													"type": "string",
													"minLength": 1,
													"description": "The `key` of a value from the field-values list."
												},
												"value": {
													"anyOf": [
														{
															"type": "string"
														},
														{
															"type": "boolean"
														},
														{
															"type": "array",
															"items": {
																"type": "string"
															}
														}
													],
													"description": "A list of the selected options for a FORM `CHECKBOX`, a boolean for a PDF checkbox, and a string for every other type."
												}
											},
											"required": [
												"key",
												"value"
											]
										},
										"description": "The values to write, at most 100 per request."
									}
								},
								"required": [
									"values"
								]
							},
							"example": {
								"values": [
									{
										"key": "startdatum",
										"value": "2026-11-01"
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"results": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string"
													},
													"success": {
														"type": "boolean",
														"description": "If `true`, the value was written. If `false`, `error` says why not."
													},
													"error": {
														"description": "Why the value was not written. Null when it was.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"code": {
																"type": "string",
																"enum": [
																	"NOT_FOUND",
																	"INVALID_STATE",
																	"VALIDATION_FAILED"
																],
																"description": "`NOT_FOUND`: no value has the key. `INVALID_STATE`: several fields share the key, or a party fills in the value when signing. `VALIDATION_FAILED`: the value doesn't match the type or the allowed options."
															},
															"message": {
																"type": "string",
																"description": "What went wrong, in English."
															},
															"userMessage": {
																"type": "string",
																"description": "What went wrong, in Swedish, for display to your users."
															}
														},
														"required": [
															"code",
															"message",
															"userMessage"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"key",
													"success",
													"error"
												],
												"additionalProperties": false
											},
											"description": "One result per input value, in request order."
										},
										"remaining": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "The keys of required values with `filledBy` `SENDER` that are still empty."
										},
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string",
														"description": "The key you send to fill in this value. For a FORM subfield or a placed box, this is the key set in the editor, or the element ID when no key is set. For an AcroForm field, this is the field name in the PDF."
													},
													"label": {
														"type": "string",
														"description": "The label shown to the sender or party."
													},
													"kind": {
														"type": "string",
														"enum": [
															"FORM",
															"PDF_ACROFORM",
															"PDF_PLACED",
															"INLINE"
														],
														"description": "Where the value lives: a FORM subfield, a form field that is part of the uploaded PDF, or a box placed on the PDF."
													},
													"fieldId": {
														"type": "string",
														"description": "The ID of the document field that holds this value. For an AcroForm field that spans several page fields, the first of them."
													},
													"type": {
														"type": "string",
														"description": "The input type: a FORM subfield type such as `INPUT`, `DATEPICKER`, or `CHECKBOX`, an AcroForm field type such as `TEXT` or `DROPDOWN`, or a box input type such as `DATE`."
													},
													"required": {
														"type": "boolean"
													},
													"options": {
														"description": "The allowed values. A value outside this list is rejected. Null when any value is allowed.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													},
													"value": {
														"anyOf": [
															{
																"anyOf": [
																	{
																		"type": "string"
																	},
																	{
																		"type": "boolean"
																	},
																	{
																		"type": "array",
																		"items": {
																			"type": "string"
																		}
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "The current value, or `null` if the value is empty. A FORM `CHECKBOX` holds a list of the selected options, and a PDF checkbox holds a boolean."
													},
													"filledBy": {
														"type": "string",
														"enum": [
															"SENDER",
															"SIGNER"
														],
														"description": "If `SENDER`, you can write the value. If `SIGNER`, the party fills in the value when signing, and the value is read-only."
													},
													"partyId": {
														"description": "The ID of the party that fills in the value when `filledBy` is `SIGNER`.",
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"key",
													"label",
													"kind",
													"fieldId",
													"type",
													"required",
													"options",
													"value",
													"filledBy",
													"partyId"
												],
												"additionalProperties": false
											},
											"description": "Every value on the document after the write, as `GET /api/v1/documents/:id/field-values` returns them."
										}
									},
									"required": [
										"results",
										"remaining",
										"data"
									],
									"additionalProperties": false
								},
								"example": {
									"results": [
										{
											"key": "startdatum",
											"success": true,
											"error": null
										}
									],
									"remaining": [],
									"data": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"kind": "FORM",
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"type": "Anställningsavtal – Kai Lindqvist",
											"required": true,
											"options": [
												"Heltid"
											],
											"value": "540000",
											"filledBy": "SENDER",
											"partyId": "cm4k2x9p10004abcd1234efgh"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected array, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "values",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected array, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "document"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/content": {
			"get": {
				"description": "List the content blocks of a document in position order, with full type-specific metadata.\n\nFor `PDF` fields, `fieldMeta.placedFields` holds the boxes placed on the PDF pages (signature and initials marks, signer inputs, fixed text) with their page and coordinates, and `fieldMeta.formFields` holds form fields extracted from the PDF itself. See the field placement guide for the coordinate model.\n\nTo find the field that holds a FORM subfield, an AcroForm field, or a placed box by its key, pass `key`.",
				"summary": "List document content",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "key",
						"in": "query",
						"description": "Returns only the fields that hold a value with one of these keys: a FORM subfield, an AcroForm field, or a box placed on a PDF. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"minLength": 1
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentContent",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Adds content blocks to a document. Send the blocks in `content`, even when you create one.\n\n**Field Types:**\n- `TEXT` - Rich text content section (Tiptap editor format)\n- `HTML` - Raw HTML content with custom styling (API-only, sanitized for security)\n- `FORM` - Form with input fields for signers\n- `PDF` - PDF file section\n- `PRODUCT_TABLE` - Product/service table with pricing\n- `TABLE` - Simple table with custom rows and columns\n- `SPACER`, `PAGE_BREAK`, `DURATION` - Layout and duration blocks\n\n**Field Position:** The 0-based index of the field among the content blocks. A field sent to a taken index goes there, and the fields from that index on move down by one. A position past the end puts the field last.\n\n**Field Metadata:** Each field type has specific metadata requirements. See schema documentation for details.\n\n**Placing fields on a PDF:** a `PDF` field renders an uploaded PDF (`fieldMeta.value` is the storage `key` returned by the files endpoint). Add boxes on its pages with `fieldMeta.placedFields`. Each entry has a unique `id`, a `page` counted from 1, a `rect` (`x`, `y`, `width`, `height`), and a `kind`. By default, `rect` is in fractions of the page from 0 to 1, measured from its top-left corner, so `{ \"x\": 0.1, \"y\": 0.8, \"width\": 0.3, \"height\": 0.05 }` is a box near the bottom left. To send PDF points from the bottom-left corner instead, set `unit` to `POINTS` and `origin` to `BOTTOM_LEFT`. The server fills `pageWidth`, `pageHeight`, and `pageRotation` from the PDF page when you omit them, and responses always return relative values from the top-left corner. The box kinds are the following:\n- `INPUT` with `inputType` `SIGNATURE` or `INITIALS` and a `partyId`: a mark the party draws at signing, sealed into the PDF at that position.\n- `INPUT` with `inputType` `TEXT`, `DATE`, `CHECKBOX` or `SELECT` and a `partyId`: a value the party fills in before signing. Set `required` to block signing until it is filled.\n- `STATIC` with `content` (HTML): fixed text stamped at that position.\n\nSet `key` on an `INPUT` box to fill it in by that key through `PATCH /api/v1/documents/{id}/field-values`. A key can contain lowercase letters, digits, hyphens, and underscores.\n\nThe following example creates a PDF field with a signature box:\n\n```json\n{\n  \"content\": [\n    {\n      \"type\": \"PDF\",\n      \"position\": 0,\n      \"fieldMeta\": {\n        \"type\": \"PDF\",\n        \"value\": \"f/org_123/abc123def/contract.pdf\",\n        \"placedFields\": [\n          {\n            \"id\": \"sig-1\",\n            \"kind\": \"INPUT\",\n            \"inputType\": \"SIGNATURE\",\n            \"page\": 2,\n            \"rect\": { \"x\": 0.12, \"y\": 0.83, \"width\": 0.34, \"height\": 0.06 },\n            \"partyId\": \"PARTY_ID\",\n            \"required\": true\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\nThe request fails with an HTTP `400 Bad Request` status code, and writes nothing, when a box has a `page` the PDF doesn't have, doesn't fit on its page, names a `partyId` that isn't a party on the document, or is a `SIGNATURE` or `INITIALS` box without a party with the `SIGNER` role. The `issues` array in the response lists every problem with its path, such as `content.0.fieldMeta.placedFields.2.rect`.\n\nThe response lists the created fields in request order, each in the same shape as `GET /api/v1/documents/{id}/content/{contentId}`. To add, move, or remove single boxes later, use `PATCH /api/v1/documents/{id}/content/{contentId}/placed-fields`.\n\n**Product tables:** a `PRODUCT_TABLE` field's `price` values are decimal amounts in the table's `currency`, such as `1499.5`, not minor units. `vat` is a rate in percent, such as `25`.\n\n**Fields a party fills in:** In `TEXT` or `HTML` content, place a field with a `<sajn-field>` tag, such as `<sajn-field key=\"buyer-phone\" party=\"PARTY_ID\" type=\"TEXT\" label=\"Phone\"></sajn-field>`. `key` names the field, and `party` is the party who fills it in. `type` is `TEXT` (default), `DATE`, or `SELECT` with its choices in `options`, separated by commas. A field is required unless you set `required=\"false\"`, and `value` prefills it. To fill a `TEXT` field from the party's eID verification, set `identity` to `NAME` or `SSN`; the party must open the document through an eID ACCESS gate that returns that value, and they can't change it. Responses return the same tag.\n\n**HTML Field Security:** HTML fields accept raw HTML but are automatically sanitized server-side to allow only safe formatting tags (p, div, span, headings, lists, tables, images) and basic CSS styling. Links, script tags, and dangerous attributes are stripped. Images support HTTP/HTTPS URLs and data URIs for inline images.",
				"summary": "Create document content",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createDocumentContent",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"content": {
										"minItems": 1,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"TEXT",
														"HTML",
														"FORM",
														"PDF",
														"PRODUCT_TABLE",
														"TABLE",
														"SPACER",
														"PAGE_BREAK",
														"DURATION"
													]
												},
												"position": {
													"type": "integer",
													"minimum": 0,
													"maximum": 9007199254740991,
													"description": "0-based index to put the block at. The blocks from that index on move down by one. A position past the end puts the block last."
												},
												"fieldMeta": {
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			},
																			"unit": {
																				"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																				"type": "string",
																				"enum": [
																					"RELATIVE",
																					"POINTS"
																				]
																			},
																			"origin": {
																				"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																				"type": "string",
																				"enum": [
																					"TOP_LEFT",
																					"BOTTOM_LEFT"
																				]
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		]
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind",
																					"inputType"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind"
																				]
																			}
																		],
																		"description": "A box placed on a page of a PDF field"
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						]
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				}
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		]
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	]
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	]
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	]
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	]
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	}
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				]
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		]
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					]
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		]
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																}
															},
															"required": [
																"type"
															]
														}
													]
												}
											},
											"required": [
												"type",
												"position",
												"fieldMeta"
											]
										},
										"description": "The content blocks to create, in the order the response lists them"
									}
								},
								"required": [
									"content"
								]
							},
							"example": {
								"content": [
									{
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>",
											"locked": false,
											"sectionStyle": {
												"background": "NONE",
												"padding": "NONE",
												"bleed": false,
												"border": false
											},
											"hidden": false
										}
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											},
											"description": "The created fields, in request order"
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected array, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "content",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected array, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/content/{contentId}": {
			"get": {
				"description": "Get one content block of a document by its field ID, with full type-specific metadata.",
				"summary": "Get a document content block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentContentBlock",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique field identifier"
										},
										"documentId": {
											"description": "Document this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"templateId": {
											"description": "Template this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"TEXT",
												"HTML",
												"FORM",
												"PDF",
												"PRODUCT_TABLE",
												"TABLE",
												"SPACER",
												"PAGE_BREAK",
												"DURATION"
											],
											"description": "Field type"
										},
										"position": {
											"type": "number",
											"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
										},
										"fieldMeta": {
											"anyOf": [
												{
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"additionalProperties": false,
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		],
																		"additionalProperties": {}
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind",
																					"inputType"
																				],
																				"additionalProperties": {}
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind"
																				],
																				"additionalProperties": {}
																			}
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		],
																		"additionalProperties": false
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	],
																	"additionalProperties": false
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	],
																	"additionalProperties": false
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	],
																	"additionalProperties": false
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		],
																		"additionalProperties": false
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					],
																					"additionalProperties": false
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		],
																		"additionalProperties": false
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														}
													]
												},
												{
													"type": "null"
												}
											],
											"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
										},
										"createdAt": {
											"description": "Date and time when the field was created",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the field was last updated",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"templateId",
										"type",
										"position",
										"fieldMeta",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10009abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"templateId": null,
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"templateId": null,
									"type": "TEXT",
									"position": 0,
									"fieldMeta": {
										"type": "TEXT",
										"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"patch": {
				"description": "Updates a document field by its ID. Only DRAFT documents can be changed. To fill in a value, such as a FORM subfield, use `PATCH /api/v1/documents/{id}/field-values` instead. To find the field that holds a key, call `GET /api/v1/documents/{id}/content?key=KEY`.\n\n**Updatable properties:**\n- `type` - Field type\n- `position` - The 0-based index to move the field to\n- `fieldMeta` - The full metadata for the field type, which replaces the stored metadata\n\nThe following example updates an HTML field:\n\n```json\nPATCH /api/v1/documents/{docId}/content/{contentId}\n{\n  \"type\": \"HTML\",\n  \"fieldMeta\": {\n    \"type\": \"HTML\",\n    \"content\": \"<div style='text-align: center'><h1>Contract title</h1><p>Custom styled content</p></div>\"\n  }\n}\n```\n\nThe response is the updated field, in the same shape as `GET /api/v1/documents/{id}/content/{contentId}`.",
				"summary": "Update a document content block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateDocumentContent",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"type": {
										"description": "Field type",
										"type": "string",
										"enum": [
											"TEXT",
											"HTML",
											"FORM",
											"PDF",
											"PRODUCT_TABLE",
											"TABLE",
											"SPACER",
											"PAGE_BREAK",
											"DURATION"
										]
									},
									"position": {
										"description": "0-based index to move the block to. The blocks between its old and new index move by one to make room.",
										"type": "number"
									},
									"fieldMeta": {
										"description": "The full metadata for the field type. It replaces the stored metadata.",
										"oneOf": [
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"TEXT"
														]
													},
													"content": {
														"type": "string"
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"HTML"
														]
													},
													"content": {
														"type": "string"
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"PDF"
														]
													},
													"value": {
														"type": "string"
													},
													"numPages": {
														"type": "number"
													},
													"pageIndex": {
														"type": "integer",
														"minimum": 0,
														"maximum": 9007199254740991
													},
													"instruction": {
														"type": "string"
													},
													"formFields": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"name": {
																	"type": "string"
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT",
																		"CHECKBOX",
																		"DROPDOWN",
																		"RADIO"
																	]
																},
																"page": {
																	"type": "integer",
																	"minimum": 1,
																	"maximum": 9007199254740991,
																	"description": "The page the box is on, counted from 1."
																},
																"rect": {
																	"type": "object",
																	"properties": {
																		"x": {
																			"type": "number"
																		},
																		"y": {
																			"type": "number"
																		},
																		"width": {
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"height": {
																			"type": "number",
																			"exclusiveMinimum": 0
																		}
																	},
																	"required": [
																		"x",
																		"y",
																		"width",
																		"height"
																	],
																	"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																},
																"pageWidth": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"pageHeight": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"pageRotation": {
																	"anyOf": [
																		{
																			"type": "number",
																			"enum": [
																				0
																			]
																		},
																		{
																			"type": "number",
																			"enum": [
																				90
																			]
																		},
																		{
																			"type": "number",
																			"enum": [
																				180
																			]
																		},
																		{
																			"type": "number",
																			"enum": [
																				270
																			]
																		}
																	]
																},
																"options": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"required": {
																	"type": "boolean"
																},
																"readOnly": {
																	"type": "boolean"
																},
																"multiline": {
																	"type": "boolean"
																},
																"exportValue": {
																	"type": "string"
																},
																"unit": {
																	"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																	"type": "string",
																	"enum": [
																		"RELATIVE",
																		"POINTS"
																	]
																},
																"origin": {
																	"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																	"type": "string",
																	"enum": [
																		"TOP_LEFT",
																		"BOTTOM_LEFT"
																	]
																}
															},
															"required": [
																"name",
																"type",
																"page",
																"rect",
																"pageWidth",
																"pageHeight"
															]
														}
													},
													"formValues": {
														"type": "object",
														"additionalProperties": {
															"type": [
																"string",
																"boolean"
															]
														}
													},
													"placedFields": {
														"type": "array",
														"items": {
															"oneOf": [
																{
																	"type": "object",
																	"properties": {
																		"id": {
																			"type": "string",
																			"minLength": 1
																		},
																		"page": {
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 9007199254740991,
																			"description": "The page the box is on, counted from 1."
																		},
																		"rect": {
																			"type": "object",
																			"properties": {
																				"x": {
																					"type": "number"
																				},
																				"y": {
																					"type": "number"
																				},
																				"width": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				},
																				"height": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				}
																			},
																			"required": [
																				"x",
																				"y",
																				"width",
																				"height"
																			],
																			"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																		},
																		"pageWidth": {
																			"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageHeight": {
																			"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageRotation": {
																			"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																			"anyOf": [
																				{
																					"type": "number",
																					"enum": [
																						0
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						90
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						180
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						270
																					]
																				}
																			]
																		},
																		"name": {
																			"type": "string"
																		},
																		"key": {
																			"type": "string",
																			"pattern": "^[a-z0-9_-]*$"
																		},
																		"locked": {
																			"type": "boolean"
																		},
																		"style": {
																			"type": "object",
																			"properties": {
																				"fontSize": {
																					"type": "number",
																					"minimum": 6,
																					"maximum": 72
																				},
																				"color": {
																					"type": "string",
																					"pattern": "^#[0-9a-fA-F]{6}$"
																				},
																				"bold": {
																					"type": "boolean"
																				},
																				"italic": {
																					"type": "boolean"
																				},
																				"align": {
																					"type": "string",
																					"enum": [
																						"LEFT",
																						"CENTER",
																						"RIGHT"
																					]
																				}
																			}
																		},
																		"kind": {
																			"type": "string",
																			"enum": [
																				"INPUT"
																			]
																		},
																		"inputType": {
																			"type": "string",
																			"enum": [
																				"TEXT",
																				"DATE",
																				"CHECKBOX",
																				"SELECT",
																				"DRAW",
																				"SIGNATURE",
																				"INITIALS"
																			]
																		},
																		"label": {
																			"type": "string"
																		},
																		"fillSource": {
																			"type": "string",
																			"enum": [
																				"SIGNER",
																				"FIXED",
																				"NONE",
																				"VARIABLE"
																			]
																		},
																		"partyId": {
																			"type": "string"
																		},
																		"variableId": {
																			"type": "string"
																		},
																		"identity": {
																			"type": "string",
																			"enum": [
																				"name",
																				"ssn"
																			]
																		},
																		"drawn": {
																			"type": "boolean"
																		},
																		"required": {
																			"type": "boolean"
																		},
																		"options": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"multiline": {
																			"type": "boolean"
																		},
																		"format": {
																			"type": "string",
																			"enum": [
																				"email",
																				"phone",
																				"personnummer",
																				"orgnr",
																				"number"
																			]
																		},
																		"min": {
																			"type": "number"
																		},
																		"max": {
																			"type": "number"
																		},
																		"decimals": {
																			"type": "integer",
																			"minimum": 0,
																			"maximum": 6
																		},
																		"step": {
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"unit": {
																			"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																			"type": "string",
																			"enum": [
																				"RELATIVE",
																				"POINTS"
																			]
																		},
																		"origin": {
																			"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																			"type": "string",
																			"enum": [
																				"TOP_LEFT",
																				"BOTTOM_LEFT"
																			]
																		}
																	},
																	"required": [
																		"id",
																		"page",
																		"rect",
																		"kind",
																		"inputType"
																	]
																},
																{
																	"type": "object",
																	"properties": {
																		"id": {
																			"type": "string",
																			"minLength": 1
																		},
																		"page": {
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 9007199254740991,
																			"description": "The page the box is on, counted from 1."
																		},
																		"rect": {
																			"type": "object",
																			"properties": {
																				"x": {
																					"type": "number"
																				},
																				"y": {
																					"type": "number"
																				},
																				"width": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				},
																				"height": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				}
																			},
																			"required": [
																				"x",
																				"y",
																				"width",
																				"height"
																			],
																			"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																		},
																		"pageWidth": {
																			"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageHeight": {
																			"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageRotation": {
																			"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																			"anyOf": [
																				{
																					"type": "number",
																					"enum": [
																						0
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						90
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						180
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						270
																					]
																				}
																			]
																		},
																		"name": {
																			"type": "string"
																		},
																		"key": {
																			"type": "string",
																			"pattern": "^[a-z0-9_-]*$"
																		},
																		"locked": {
																			"type": "boolean"
																		},
																		"style": {
																			"type": "object",
																			"properties": {
																				"fontSize": {
																					"type": "number",
																					"minimum": 6,
																					"maximum": 72
																				},
																				"color": {
																					"type": "string",
																					"pattern": "^#[0-9a-fA-F]{6}$"
																				},
																				"bold": {
																					"type": "boolean"
																				},
																				"italic": {
																					"type": "boolean"
																				},
																				"align": {
																					"type": "string",
																					"enum": [
																						"LEFT",
																						"CENTER",
																						"RIGHT"
																					]
																				}
																			}
																		},
																		"kind": {
																			"type": "string",
																			"enum": [
																				"STATIC"
																			]
																		},
																		"content": {
																			"type": "string"
																		},
																		"text": {
																			"type": "string"
																		},
																		"unit": {
																			"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																			"type": "string",
																			"enum": [
																				"RELATIVE",
																				"POINTS"
																			]
																		},
																		"origin": {
																			"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																			"type": "string",
																			"enum": [
																				"TOP_LEFT",
																				"BOTTOM_LEFT"
																			]
																		}
																	},
																	"required": [
																		"id",
																		"page",
																		"rect",
																		"kind"
																	]
																}
															],
															"description": "A box placed on a page of a PDF field"
														}
													},
													"locked": {
														"type": "boolean"
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"FORM"
														]
													},
													"columns": {
														"type": "number",
														"minimum": 1
													},
													"fields": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"minLength": 1
																},
																"key": {
																	"type": "string",
																	"pattern": "^[a-z0-9_-]*$"
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"INPUT",
																		"TEXT",
																		"SELECT",
																		"DATEPICKER",
																		"RADIO",
																		"CHECKBOX",
																		"NUMBER",
																		"ATTACHMENT"
																	]
																},
																"row": {
																	"type": "number",
																	"minimum": 0
																},
																"column": {
																	"type": "number",
																	"minimum": 0
																},
																"colSpan": {
																	"type": "integer",
																	"exclusiveMinimum": 0,
																	"maximum": 9007199254740991
																},
																"fieldMeta": {
																	"oneOf": [
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"INPUT"
																					]
																				},
																				"value": {
																					"type": "string"
																				},
																				"format": {
																					"type": "string",
																					"enum": [
																						"email",
																						"phone",
																						"personnummer",
																						"orgnr"
																					]
																				},
																				"identity": {
																					"type": "string",
																					"enum": [
																						"name",
																						"ssn"
																					]
																				},
																				"maxLength": {
																					"type": "integer",
																					"exclusiveMinimum": 0,
																					"maximum": 10000
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"TEXT"
																					]
																				},
																				"value": {
																					"type": "string"
																				},
																				"rows": {
																					"type": "integer",
																					"minimum": 2,
																					"maximum": 20
																				},
																				"maxLength": {
																					"type": "integer",
																					"exclusiveMinimum": 0,
																					"maximum": 10000
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"SELECT"
																					]
																				},
																				"options": {
																					"type": "array",
																					"items": {
																						"type": "object",
																						"properties": {
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"value"
																						]
																					}
																				},
																				"defaultValue": {
																					"type": "string"
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"DATEPICKER"
																					]
																				},
																				"value": {
																					"type": "string"
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"RADIO"
																					]
																				},
																				"options": {
																					"type": "array",
																					"items": {
																						"type": "object",
																						"properties": {
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"value"
																						]
																					}
																				},
																				"value": {
																					"type": "string"
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"CHECKBOX"
																					]
																				},
																				"options": {
																					"type": "array",
																					"items": {
																						"type": "object",
																						"properties": {
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"value"
																						]
																					}
																				},
																				"values": {
																					"type": "array",
																					"items": {
																						"type": "string"
																					}
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"NUMBER"
																					]
																				},
																				"value": {
																					"type": "string"
																				},
																				"min": {
																					"type": "number"
																				},
																				"max": {
																					"type": "number"
																				},
																				"decimals": {
																					"type": "integer",
																					"minimum": 0,
																					"maximum": 6
																				},
																				"step": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				},
																				"unit": {
																					"type": "string",
																					"maxLength": 12
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"ATTACHMENT"
																					]
																				},
																				"appendixLabel": {
																					"type": "string"
																				},
																				"allowedTypes": {
																					"type": "array",
																					"items": {
																						"type": "string",
																						"enum": [
																							"PDF",
																							"IMAGE"
																						]
																					}
																				},
																				"includeInDocument": {
																					"type": "boolean"
																				},
																				"value": {
																					"type": "object",
																					"properties": {
																						"filename": {
																							"type": "string"
																						},
																						"mimeType": {
																							"type": "string"
																						},
																						"size": {
																							"type": "number",
																							"description": "Size in bytes"
																						}
																					},
																					"required": [
																						"filename",
																						"mimeType",
																						"size"
																					],
																					"additionalProperties": {},
																					"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																				}
																			},
																			"required": [
																				"type"
																			]
																		}
																	]
																}
															},
															"required": [
																"id",
																"row",
																"column"
															]
														}
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type",
													"columns",
													"fields"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"PRODUCT_TABLE"
														]
													},
													"name": {
														"type": "string"
													},
													"enableName": {
														"type": "boolean"
													},
													"columns": {
														"type": "object",
														"additionalProperties": {
															"type": "object",
															"properties": {
																"name": {
																	"type": "string"
																},
																"originalName": {
																	"type": "string"
																},
																"enabled": {
																	"type": "boolean"
																},
																"key": {
																	"type": "string"
																},
																"settings": {
																	"type": "object",
																	"properties": {
																		"decimalPlaces": {
																			"type": "number"
																		},
																		"oneTimePayment": {
																			"type": "boolean"
																		},
																		"pricePrefix": {
																			"type": "string"
																		},
																		"priceSuffix": {
																			"type": "string"
																		},
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	}
																}
															},
															"required": [
																"name",
																"originalName",
																"enabled",
																"key",
																"settings"
															]
														}
													},
													"summaryLabels": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "string"
															},
															"vat": {
																"type": "string"
															},
															"total": {
																"type": "string"
															},
															"payable": {
																"type": "string"
															}
														},
														"required": [
															"subtotal",
															"vat",
															"total"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"type": "string"
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"selectedProductIds": {
														"type": "array",
														"items": {
															"type": "string"
														}
													},
													"recipientChoice": {
														"type": "object",
														"properties": {
															"selectedIds": {
																"type": "array",
																"items": {
																	"type": "string"
																}
															},
															"quantities": {
																"type": "object",
																"additionalProperties": {
																	"type": "number"
																}
															}
														},
														"required": [
															"selectedIds",
															"quantities"
														]
													},
													"payment": {
														"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
														"type": "object",
														"properties": {
															"enabled": {
																"type": "boolean"
															},
															"payerPartyId": {
																"description": "The party who pays. Without it, `selectionPartyId` pays.",
																"type": "string"
															},
															"basis": {
																"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																"type": "string",
																"enum": [
																	"ONE_TIME",
																	"FIRST_PERIOD"
																]
															},
															"percent": {
																"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																"type": "integer",
																"minimum": 1,
																"maximum": 100
															}
														},
														"required": [
															"enabled"
														]
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																},
																"showSubtotal": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name"
															]
														}
													},
													"discount": {
														"type": "object",
														"properties": {
															"type": {
																"type": "string",
																"enum": [
																	"PERCENT",
																	"AMOUNT"
																]
															},
															"value": {
																"type": "number"
															},
															"label": {
																"type": "string"
															}
														},
														"required": [
															"type",
															"value"
														]
													},
													"pricing": {
														"type": "object",
														"properties": {
															"pricesIncludeVat": {
																"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																"type": "boolean"
															},
															"defaultVatRate": {
																"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																"type": "number"
															},
															"showVatBreakdown": {
																"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																"type": "boolean"
															}
														}
													},
													"style": {
														"type": "object",
														"properties": {
															"border": {
																"type": "boolean"
															},
															"rounded": {
																"type": "boolean"
															}
														}
													},
													"currency": {
														"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
														"type": "string",
														"pattern": "^[A-Z]{3}$"
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"products": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": "string"
																},
																"price": {
																	"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																	"type": "number"
																},
																"unit": {
																	"type": "string"
																},
																"quantity": {
																	"type": "number"
																},
																"vat": {
																	"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																	"type": "number"
																},
																"optional": {
																	"type": "boolean"
																},
																"defaultSelected": {
																	"type": "boolean"
																},
																"quantityEditable": {
																	"type": "boolean"
																},
																"quantityMin": {
																	"type": "number"
																},
																"quantityMax": {
																	"type": "number"
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	]
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"sectionId": {
																	"type": "string"
																},
																"sku": {
																	"type": "string"
																},
																"productId": {
																	"type": "string"
																},
																"productType": {
																	"type": "string",
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT"
																	]
																}
															},
															"required": [
																"id",
																"name"
															]
														}
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type",
													"name",
													"columns",
													"products"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"TABLE"
														]
													},
													"columns": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT",
																		"NUMBER"
																	]
																}
															},
															"required": [
																"id",
																"name",
																"type"
															]
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"cells": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"columnId": {
																				"type": "string"
																			},
																			"value": {
																				"type": [
																					"string",
																					"number"
																				]
																			}
																		},
																		"required": [
																			"columnId",
																			"value"
																		]
																	}
																}
															},
															"required": [
																"id",
																"cells"
															]
														}
													},
													"showHeaders": {
														"type": "boolean"
													},
													"style": {
														"type": "object",
														"properties": {
															"border": {
																"type": "boolean"
															},
															"rounded": {
																"type": "boolean"
															}
														}
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type",
													"columns",
													"rows"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"SPACER"
														]
													},
													"size": {
														"type": "string",
														"enum": [
															"S",
															"M",
															"L",
															"XL"
														]
													},
													"locked": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"PAGE_BREAK"
														]
													},
													"locked": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"DURATION"
														]
													},
													"durationType": {
														"type": "string",
														"enum": [
															"NONE",
															"SINGLE_PERIOD",
															"RECURRING",
															"RECURRING_WITH_INITIAL",
															"NOT_SET"
														]
													},
													"period": {
														"type": "object",
														"properties": {
															"value": {
																"type": "integer",
																"exclusiveMinimum": 0,
																"maximum": 9007199254740991
															},
															"unit": {
																"type": "string",
																"enum": [
																	"DAY",
																	"WEEK",
																	"MONTH",
																	"YEAR"
																]
															}
														},
														"required": [
															"value",
															"unit"
														]
													},
													"noticePeriod": {
														"type": "object",
														"properties": {
															"value": {
																"type": "integer",
																"exclusiveMinimum": 0,
																"maximum": 9007199254740991
															},
															"unit": {
																"type": "string",
																"enum": [
																	"DAY",
																	"WEEK",
																	"MONTH",
																	"YEAR"
																]
															}
														},
														"required": [
															"value",
															"unit"
														]
													},
													"startDate": {
														"type": "string"
													},
													"endDate": {
														"type": "string"
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													}
												},
												"required": [
													"type"
												]
											}
										]
									}
								}
							},
							"example": {
								"type": "TEXT",
								"position": 0,
								"fieldMeta": {
									"type": "TEXT",
									"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>",
									"locked": false,
									"sectionStyle": {
										"background": "NONE",
										"padding": "NONE",
										"bleed": false,
										"border": false
									},
									"hidden": false
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique field identifier"
										},
										"documentId": {
											"description": "Document this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"templateId": {
											"description": "Template this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"TEXT",
												"HTML",
												"FORM",
												"PDF",
												"PRODUCT_TABLE",
												"TABLE",
												"SPACER",
												"PAGE_BREAK",
												"DURATION"
											],
											"description": "Field type"
										},
										"position": {
											"type": "number",
											"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
										},
										"fieldMeta": {
											"anyOf": [
												{
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"additionalProperties": false,
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		],
																		"additionalProperties": {}
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind",
																					"inputType"
																				],
																				"additionalProperties": {}
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind"
																				],
																				"additionalProperties": {}
																			}
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		],
																		"additionalProperties": false
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	],
																	"additionalProperties": false
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	],
																	"additionalProperties": false
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	],
																	"additionalProperties": false
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		],
																		"additionalProperties": false
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					],
																					"additionalProperties": false
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		],
																		"additionalProperties": false
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														}
													]
												},
												{
													"type": "null"
												}
											],
											"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
										},
										"createdAt": {
											"description": "Date and time when the field was created",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the field was last updated",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"templateId",
										"type",
										"position",
										"fieldMeta",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10009abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"templateId": null,
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"templateId": null,
									"type": "TEXT",
									"position": 0,
									"fieldMeta": {
										"type": "TEXT",
										"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "type",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Deletes a field from a document. Only DRAFT documents can be changed. The response holds the ID of the deleted field; to keep its content, read the field before you delete it.",
				"summary": "Delete a document content block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteDocumentContent",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted field"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the content block is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/content/{contentId}/placed-fields": {
			"patch": {
				"description": "Changes individual boxes on a PDF field without sending the whole field. Only DRAFT documents can be changed.\n\nEach box in `upsert` has the same shape as an entry in `fieldMeta.placedFields` on `POST /api/v1/documents/{id}/content`, and is checked the same way. The response is the updated field, in the same shape as `GET /api/v1/documents/{id}/content/{contentId}`. A box whose `id` already exists on the field replaces that box and keeps its stacking order. A box with a new `id` is added on top. `remove` lists the ids of boxes to delete. Boxes you don't mention stay as they are.\n\nThe change is atomic: if any box is invalid, nothing is written and the response lists every problem in `issues`. If another edit changes the field while the request runs, the request fails with an HTTP `409 Conflict` status code and code `INVALID_STATE`; send it again.\n\n**Example - move one box and remove another:**\n```json\nPATCH /api/v1/documents/{docId}/content/{contentId}/placed-fields\n{\n  \"upsert\": [\n    {\n      \"id\": \"sig-1\",\n      \"kind\": \"INPUT\",\n      \"inputType\": \"SIGNATURE\",\n      \"page\": 2,\n      \"rect\": { \"x\": 0.12, \"y\": 0.8, \"width\": 0.34, \"height\": 0.06 },\n      \"partyId\": \"PARTY_ID\"\n    }\n  ],\n  \"remove\": [\"initials-3\"]\n}\n```",
				"summary": "Add, update, or remove boxes on a PDF block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateDocumentContentPlacedFields",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"upsert": {
										"description": "Boxes to add or replace. A box whose `id` already exists on the field replaces that box and keeps its stacking order; any other box is added on top.",
										"maxItems": 500,
										"type": "array",
										"items": {
											"oneOf": [
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"description": "The content block ID."
														},
														"page": {
															"type": "integer",
															"minimum": 1,
															"maximum": 9007199254740991,
															"description": "The page the box is on, counted from 1."
														},
														"rect": {
															"type": "object",
															"properties": {
																"x": {
																	"type": "number"
																},
																"y": {
																	"type": "number"
																},
																"width": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"height": {
																	"type": "number",
																	"exclusiveMinimum": 0
																}
															},
															"required": [
																"x",
																"y",
																"width",
																"height"
															],
															"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
														},
														"pageWidth": {
															"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageHeight": {
															"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageRotation": {
															"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
															"anyOf": [
																{
																	"type": "number",
																	"enum": [
																		0
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		90
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		180
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		270
																	]
																}
															]
														},
														"name": {
															"type": "string"
														},
														"key": {
															"type": "string",
															"pattern": "^[a-z0-9_-]*$"
														},
														"locked": {
															"type": "boolean"
														},
														"style": {
															"type": "object",
															"properties": {
																"fontSize": {
																	"type": "number",
																	"minimum": 6,
																	"maximum": 72
																},
																"color": {
																	"type": "string",
																	"pattern": "^#[0-9a-fA-F]{6}$"
																},
																"bold": {
																	"type": "boolean"
																},
																"italic": {
																	"type": "boolean"
																},
																"align": {
																	"type": "string",
																	"enum": [
																		"LEFT",
																		"CENTER",
																		"RIGHT"
																	]
																}
															}
														},
														"kind": {
															"type": "string",
															"enum": [
																"INPUT"
															]
														},
														"inputType": {
															"type": "string",
															"enum": [
																"TEXT",
																"DATE",
																"CHECKBOX",
																"SELECT",
																"DRAW",
																"SIGNATURE",
																"INITIALS"
															]
														},
														"label": {
															"type": "string"
														},
														"fillSource": {
															"type": "string",
															"enum": [
																"SIGNER",
																"FIXED",
																"NONE",
																"VARIABLE"
															]
														},
														"partyId": {
															"type": "string",
															"description": "The party ID."
														},
														"variableId": {
															"type": "string"
														},
														"identity": {
															"type": "string",
															"enum": [
																"name",
																"ssn"
															]
														},
														"drawn": {
															"type": "boolean"
														},
														"required": {
															"type": "boolean"
														},
														"options": {
															"type": "array",
															"items": {
																"type": "string"
															}
														},
														"multiline": {
															"type": "boolean"
														},
														"format": {
															"type": "string",
															"enum": [
																"email",
																"phone",
																"personnummer",
																"orgnr",
																"number"
															]
														},
														"min": {
															"type": "number"
														},
														"max": {
															"type": "number"
														},
														"decimals": {
															"type": "integer",
															"minimum": 0,
															"maximum": 6
														},
														"step": {
															"type": "number",
															"exclusiveMinimum": 0
														},
														"unit": {
															"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
															"type": "string",
															"enum": [
																"RELATIVE",
																"POINTS"
															]
														},
														"origin": {
															"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
															"type": "string",
															"enum": [
																"TOP_LEFT",
																"BOTTOM_LEFT"
															]
														}
													},
													"required": [
														"id",
														"page",
														"rect",
														"kind",
														"inputType"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"description": "The content block ID."
														},
														"page": {
															"type": "integer",
															"minimum": 1,
															"maximum": 9007199254740991,
															"description": "The page the box is on, counted from 1."
														},
														"rect": {
															"type": "object",
															"properties": {
																"x": {
																	"type": "number"
																},
																"y": {
																	"type": "number"
																},
																"width": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"height": {
																	"type": "number",
																	"exclusiveMinimum": 0
																}
															},
															"required": [
																"x",
																"y",
																"width",
																"height"
															],
															"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
														},
														"pageWidth": {
															"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageHeight": {
															"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageRotation": {
															"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
															"anyOf": [
																{
																	"type": "number",
																	"enum": [
																		0
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		90
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		180
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		270
																	]
																}
															]
														},
														"name": {
															"type": "string"
														},
														"key": {
															"type": "string",
															"pattern": "^[a-z0-9_-]*$"
														},
														"locked": {
															"type": "boolean"
														},
														"style": {
															"type": "object",
															"properties": {
																"fontSize": {
																	"type": "number",
																	"minimum": 6,
																	"maximum": 72
																},
																"color": {
																	"type": "string",
																	"pattern": "^#[0-9a-fA-F]{6}$"
																},
																"bold": {
																	"type": "boolean"
																},
																"italic": {
																	"type": "boolean"
																},
																"align": {
																	"type": "string",
																	"enum": [
																		"LEFT",
																		"CENTER",
																		"RIGHT"
																	]
																}
															}
														},
														"kind": {
															"type": "string",
															"enum": [
																"STATIC"
															]
														},
														"content": {
															"type": "string"
														},
														"text": {
															"type": "string"
														},
														"unit": {
															"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
															"type": "string",
															"enum": [
																"RELATIVE",
																"POINTS"
															]
														},
														"origin": {
															"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
															"type": "string",
															"enum": [
																"TOP_LEFT",
																"BOTTOM_LEFT"
															]
														}
													},
													"required": [
														"id",
														"page",
														"rect",
														"kind"
													]
												}
											],
											"description": "A box placed on a page of a PDF field"
										}
									},
									"remove": {
										"default": [],
										"description": "Ids of boxes to remove from the field.",
										"maxItems": 500,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1
										}
									}
								}
							},
							"example": {
								"upsert": [
									{
										"id": "cm4k2x9p10009abcd1234efgh",
										"page": 1,
										"rect": {
											"x": 0.12,
											"y": 0.76,
											"width": 0.3,
											"height": 0.06
										},
										"pageWidth": 595.28,
										"pageHeight": 841.89,
										"pageRotation": 0,
										"name": "Anställningsvillkor",
										"key": "startdatum",
										"locked": false,
										"style": {
											"fontSize": 6,
											"color": "#2563EB",
											"bold": false,
											"italic": false,
											"align": "LEFT"
										},
										"kind": "INPUT",
										"inputType": "TEXT",
										"label": "Startdatum",
										"fillSource": "SIGNER",
										"partyId": "cm4k2x9p10004abcd1234efgh",
										"variableId": "startdatum",
										"identity": "name",
										"drawn": false,
										"required": true,
										"options": [
											"Heltid"
										],
										"multiline": false,
										"format": "email",
										"min": 1,
										"max": 1,
										"decimals": 1,
										"step": 1,
										"unit": "RELATIVE",
										"origin": "TOP_LEFT"
									}
								],
								"remove": [
									"Anställningsvillkor"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique field identifier"
										},
										"documentId": {
											"description": "Document this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"templateId": {
											"description": "Template this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"TEXT",
												"HTML",
												"FORM",
												"PDF",
												"PRODUCT_TABLE",
												"TABLE",
												"SPACER",
												"PAGE_BREAK",
												"DURATION"
											],
											"description": "Field type"
										},
										"position": {
											"type": "number",
											"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
										},
										"fieldMeta": {
											"anyOf": [
												{
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"additionalProperties": false,
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		],
																		"additionalProperties": {}
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind",
																					"inputType"
																				],
																				"additionalProperties": {}
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind"
																				],
																				"additionalProperties": {}
																			}
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		],
																		"additionalProperties": false
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	],
																	"additionalProperties": false
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	],
																	"additionalProperties": false
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	],
																	"additionalProperties": false
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		],
																		"additionalProperties": false
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					],
																					"additionalProperties": false
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		],
																		"additionalProperties": false
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														}
													]
												},
												{
													"type": "null"
												}
											],
											"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
										},
										"createdAt": {
											"description": "Date and time when the field was created",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the field was last updated",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"templateId",
										"type",
										"position",
										"fieldMeta",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10009abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"templateId": null,
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"templateId": null,
									"type": "TEXT",
									"position": 0,
									"fieldMeta": {
										"type": "TEXT",
										"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/content": {
			"get": {
				"description": "List the content blocks of a template in position order, with full type-specific metadata. Same shape as the document fields endpoint. To find the field that holds a FORM subfield, an AcroForm field, or a placed box by its key, pass `key`.",
				"summary": "List template content",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "key",
						"in": "query",
						"description": "Returns only the fields that hold a value with one of these keys: a FORM subfield, an AcroForm field, or a box placed on a PDF. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"minLength": 1
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getTemplateContent",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:read"
						]
					}
				]
			},
			"post": {
				"description": "Adds content blocks to a template. Send the blocks in `content`, the same way as `POST /api/v1/documents/{id}/content`.",
				"summary": "Create template content",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createTemplateContent",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"content": {
										"minItems": 1,
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"TEXT",
														"HTML",
														"FORM",
														"PDF",
														"PRODUCT_TABLE",
														"TABLE",
														"SPACER",
														"PAGE_BREAK",
														"DURATION"
													]
												},
												"position": {
													"type": "integer",
													"minimum": 0,
													"maximum": 9007199254740991,
													"description": "0-based index to put the block at. The blocks from that index on move down by one. A position past the end puts the block last."
												},
												"fieldMeta": {
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			},
																			"unit": {
																				"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																				"type": "string",
																				"enum": [
																					"RELATIVE",
																					"POINTS"
																				]
																			},
																			"origin": {
																				"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																				"type": "string",
																				"enum": [
																					"TOP_LEFT",
																					"BOTTOM_LEFT"
																				]
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		]
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind",
																					"inputType"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind"
																				]
																			}
																		],
																		"description": "A box placed on a page of a PDF field"
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						]
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				}
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		]
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	]
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	]
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	]
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	]
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	}
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				]
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		]
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					]
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		]
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																}
															},
															"required": [
																"type"
															]
														}
													]
												}
											},
											"required": [
												"type",
												"position",
												"fieldMeta"
											]
										},
										"description": "The content blocks to create, in the order the response lists them"
									}
								},
								"required": [
									"content"
								]
							},
							"example": {
								"content": [
									{
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>",
											"locked": false,
											"sectionStyle": {
												"background": "NONE",
												"padding": "NONE",
												"bleed": false,
												"border": false
											},
											"hidden": false
										}
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											},
											"description": "The created fields, in request order"
										}
									},
									"required": [
										"data"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected array, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "content",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected array, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/content/{contentId}": {
			"get": {
				"description": "Get one content block of a template by its field ID.",
				"summary": "Get a template content block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getTemplateContentBlock",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique field identifier"
										},
										"documentId": {
											"description": "Document this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"templateId": {
											"description": "Template this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"TEXT",
												"HTML",
												"FORM",
												"PDF",
												"PRODUCT_TABLE",
												"TABLE",
												"SPACER",
												"PAGE_BREAK",
												"DURATION"
											],
											"description": "Field type"
										},
										"position": {
											"type": "number",
											"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
										},
										"fieldMeta": {
											"anyOf": [
												{
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"additionalProperties": false,
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		],
																		"additionalProperties": {}
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind",
																					"inputType"
																				],
																				"additionalProperties": {}
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind"
																				],
																				"additionalProperties": {}
																			}
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		],
																		"additionalProperties": false
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	],
																	"additionalProperties": false
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	],
																	"additionalProperties": false
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	],
																	"additionalProperties": false
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		],
																		"additionalProperties": false
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					],
																					"additionalProperties": false
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		],
																		"additionalProperties": false
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														}
													]
												},
												{
													"type": "null"
												}
											],
											"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
										},
										"createdAt": {
											"description": "Date and time when the field was created",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the field was last updated",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"templateId",
										"type",
										"position",
										"fieldMeta",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10009abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"templateId": null,
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"templateId": null,
									"type": "TEXT",
									"position": 0,
									"fieldMeta": {
										"type": "TEXT",
										"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:read"
						]
					}
				]
			},
			"patch": {
				"description": "Updates a template field by its ID, the same way as `PATCH /api/v1/documents/{id}/content/{contentId}`. The response is the updated field.",
				"summary": "Update a template content block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateTemplateContent",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"type": {
										"description": "Field type",
										"type": "string",
										"enum": [
											"TEXT",
											"HTML",
											"FORM",
											"PDF",
											"PRODUCT_TABLE",
											"TABLE",
											"SPACER",
											"PAGE_BREAK",
											"DURATION"
										]
									},
									"position": {
										"description": "0-based index to move the block to. The blocks between its old and new index move by one to make room.",
										"type": "number"
									},
									"fieldMeta": {
										"description": "The full metadata for the field type. It replaces the stored metadata.",
										"oneOf": [
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"TEXT"
														]
													},
													"content": {
														"type": "string"
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"HTML"
														]
													},
													"content": {
														"type": "string"
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"PDF"
														]
													},
													"value": {
														"type": "string"
													},
													"numPages": {
														"type": "number"
													},
													"pageIndex": {
														"type": "integer",
														"minimum": 0,
														"maximum": 9007199254740991
													},
													"instruction": {
														"type": "string"
													},
													"formFields": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"name": {
																	"type": "string"
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT",
																		"CHECKBOX",
																		"DROPDOWN",
																		"RADIO"
																	]
																},
																"page": {
																	"type": "integer",
																	"minimum": 1,
																	"maximum": 9007199254740991,
																	"description": "The page the box is on, counted from 1."
																},
																"rect": {
																	"type": "object",
																	"properties": {
																		"x": {
																			"type": "number"
																		},
																		"y": {
																			"type": "number"
																		},
																		"width": {
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"height": {
																			"type": "number",
																			"exclusiveMinimum": 0
																		}
																	},
																	"required": [
																		"x",
																		"y",
																		"width",
																		"height"
																	],
																	"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																},
																"pageWidth": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"pageHeight": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"pageRotation": {
																	"anyOf": [
																		{
																			"type": "number",
																			"enum": [
																				0
																			]
																		},
																		{
																			"type": "number",
																			"enum": [
																				90
																			]
																		},
																		{
																			"type": "number",
																			"enum": [
																				180
																			]
																		},
																		{
																			"type": "number",
																			"enum": [
																				270
																			]
																		}
																	]
																},
																"options": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"required": {
																	"type": "boolean"
																},
																"readOnly": {
																	"type": "boolean"
																},
																"multiline": {
																	"type": "boolean"
																},
																"exportValue": {
																	"type": "string"
																},
																"unit": {
																	"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																	"type": "string",
																	"enum": [
																		"RELATIVE",
																		"POINTS"
																	]
																},
																"origin": {
																	"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																	"type": "string",
																	"enum": [
																		"TOP_LEFT",
																		"BOTTOM_LEFT"
																	]
																}
															},
															"required": [
																"name",
																"type",
																"page",
																"rect",
																"pageWidth",
																"pageHeight"
															]
														}
													},
													"formValues": {
														"type": "object",
														"additionalProperties": {
															"type": [
																"string",
																"boolean"
															]
														}
													},
													"placedFields": {
														"type": "array",
														"items": {
															"oneOf": [
																{
																	"type": "object",
																	"properties": {
																		"id": {
																			"type": "string",
																			"minLength": 1
																		},
																		"page": {
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 9007199254740991,
																			"description": "The page the box is on, counted from 1."
																		},
																		"rect": {
																			"type": "object",
																			"properties": {
																				"x": {
																					"type": "number"
																				},
																				"y": {
																					"type": "number"
																				},
																				"width": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				},
																				"height": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				}
																			},
																			"required": [
																				"x",
																				"y",
																				"width",
																				"height"
																			],
																			"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																		},
																		"pageWidth": {
																			"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageHeight": {
																			"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageRotation": {
																			"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																			"anyOf": [
																				{
																					"type": "number",
																					"enum": [
																						0
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						90
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						180
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						270
																					]
																				}
																			]
																		},
																		"name": {
																			"type": "string"
																		},
																		"key": {
																			"type": "string",
																			"pattern": "^[a-z0-9_-]*$"
																		},
																		"locked": {
																			"type": "boolean"
																		},
																		"style": {
																			"type": "object",
																			"properties": {
																				"fontSize": {
																					"type": "number",
																					"minimum": 6,
																					"maximum": 72
																				},
																				"color": {
																					"type": "string",
																					"pattern": "^#[0-9a-fA-F]{6}$"
																				},
																				"bold": {
																					"type": "boolean"
																				},
																				"italic": {
																					"type": "boolean"
																				},
																				"align": {
																					"type": "string",
																					"enum": [
																						"LEFT",
																						"CENTER",
																						"RIGHT"
																					]
																				}
																			}
																		},
																		"kind": {
																			"type": "string",
																			"enum": [
																				"INPUT"
																			]
																		},
																		"inputType": {
																			"type": "string",
																			"enum": [
																				"TEXT",
																				"DATE",
																				"CHECKBOX",
																				"SELECT",
																				"DRAW",
																				"SIGNATURE",
																				"INITIALS"
																			]
																		},
																		"label": {
																			"type": "string"
																		},
																		"fillSource": {
																			"type": "string",
																			"enum": [
																				"SIGNER",
																				"FIXED",
																				"NONE",
																				"VARIABLE"
																			]
																		},
																		"partyId": {
																			"type": "string"
																		},
																		"variableId": {
																			"type": "string"
																		},
																		"identity": {
																			"type": "string",
																			"enum": [
																				"name",
																				"ssn"
																			]
																		},
																		"drawn": {
																			"type": "boolean"
																		},
																		"required": {
																			"type": "boolean"
																		},
																		"options": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"multiline": {
																			"type": "boolean"
																		},
																		"format": {
																			"type": "string",
																			"enum": [
																				"email",
																				"phone",
																				"personnummer",
																				"orgnr",
																				"number"
																			]
																		},
																		"min": {
																			"type": "number"
																		},
																		"max": {
																			"type": "number"
																		},
																		"decimals": {
																			"type": "integer",
																			"minimum": 0,
																			"maximum": 6
																		},
																		"step": {
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"unit": {
																			"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																			"type": "string",
																			"enum": [
																				"RELATIVE",
																				"POINTS"
																			]
																		},
																		"origin": {
																			"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																			"type": "string",
																			"enum": [
																				"TOP_LEFT",
																				"BOTTOM_LEFT"
																			]
																		}
																	},
																	"required": [
																		"id",
																		"page",
																		"rect",
																		"kind",
																		"inputType"
																	]
																},
																{
																	"type": "object",
																	"properties": {
																		"id": {
																			"type": "string",
																			"minLength": 1
																		},
																		"page": {
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 9007199254740991,
																			"description": "The page the box is on, counted from 1."
																		},
																		"rect": {
																			"type": "object",
																			"properties": {
																				"x": {
																					"type": "number"
																				},
																				"y": {
																					"type": "number"
																				},
																				"width": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				},
																				"height": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				}
																			},
																			"required": [
																				"x",
																				"y",
																				"width",
																				"height"
																			],
																			"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																		},
																		"pageWidth": {
																			"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageHeight": {
																			"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																			"type": "number",
																			"exclusiveMinimum": 0
																		},
																		"pageRotation": {
																			"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																			"anyOf": [
																				{
																					"type": "number",
																					"enum": [
																						0
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						90
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						180
																					]
																				},
																				{
																					"type": "number",
																					"enum": [
																						270
																					]
																				}
																			]
																		},
																		"name": {
																			"type": "string"
																		},
																		"key": {
																			"type": "string",
																			"pattern": "^[a-z0-9_-]*$"
																		},
																		"locked": {
																			"type": "boolean"
																		},
																		"style": {
																			"type": "object",
																			"properties": {
																				"fontSize": {
																					"type": "number",
																					"minimum": 6,
																					"maximum": 72
																				},
																				"color": {
																					"type": "string",
																					"pattern": "^#[0-9a-fA-F]{6}$"
																				},
																				"bold": {
																					"type": "boolean"
																				},
																				"italic": {
																					"type": "boolean"
																				},
																				"align": {
																					"type": "string",
																					"enum": [
																						"LEFT",
																						"CENTER",
																						"RIGHT"
																					]
																				}
																			}
																		},
																		"kind": {
																			"type": "string",
																			"enum": [
																				"STATIC"
																			]
																		},
																		"content": {
																			"type": "string"
																		},
																		"text": {
																			"type": "string"
																		},
																		"unit": {
																			"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																			"type": "string",
																			"enum": [
																				"RELATIVE",
																				"POINTS"
																			]
																		},
																		"origin": {
																			"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																			"type": "string",
																			"enum": [
																				"TOP_LEFT",
																				"BOTTOM_LEFT"
																			]
																		}
																	},
																	"required": [
																		"id",
																		"page",
																		"rect",
																		"kind"
																	]
																}
															],
															"description": "A box placed on a page of a PDF field"
														}
													},
													"locked": {
														"type": "boolean"
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"FORM"
														]
													},
													"columns": {
														"type": "number",
														"minimum": 1
													},
													"fields": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"minLength": 1
																},
																"key": {
																	"type": "string",
																	"pattern": "^[a-z0-9_-]*$"
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"INPUT",
																		"TEXT",
																		"SELECT",
																		"DATEPICKER",
																		"RADIO",
																		"CHECKBOX",
																		"NUMBER",
																		"ATTACHMENT"
																	]
																},
																"row": {
																	"type": "number",
																	"minimum": 0
																},
																"column": {
																	"type": "number",
																	"minimum": 0
																},
																"colSpan": {
																	"type": "integer",
																	"exclusiveMinimum": 0,
																	"maximum": 9007199254740991
																},
																"fieldMeta": {
																	"oneOf": [
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"INPUT"
																					]
																				},
																				"value": {
																					"type": "string"
																				},
																				"format": {
																					"type": "string",
																					"enum": [
																						"email",
																						"phone",
																						"personnummer",
																						"orgnr"
																					]
																				},
																				"identity": {
																					"type": "string",
																					"enum": [
																						"name",
																						"ssn"
																					]
																				},
																				"maxLength": {
																					"type": "integer",
																					"exclusiveMinimum": 0,
																					"maximum": 10000
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"TEXT"
																					]
																				},
																				"value": {
																					"type": "string"
																				},
																				"rows": {
																					"type": "integer",
																					"minimum": 2,
																					"maximum": 20
																				},
																				"maxLength": {
																					"type": "integer",
																					"exclusiveMinimum": 0,
																					"maximum": 10000
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"SELECT"
																					]
																				},
																				"options": {
																					"type": "array",
																					"items": {
																						"type": "object",
																						"properties": {
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"value"
																						]
																					}
																				},
																				"defaultValue": {
																					"type": "string"
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"DATEPICKER"
																					]
																				},
																				"value": {
																					"type": "string"
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"RADIO"
																					]
																				},
																				"options": {
																					"type": "array",
																					"items": {
																						"type": "object",
																						"properties": {
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"value"
																						]
																					}
																				},
																				"value": {
																					"type": "string"
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"CHECKBOX"
																					]
																				},
																				"options": {
																					"type": "array",
																					"items": {
																						"type": "object",
																						"properties": {
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"value"
																						]
																					}
																				},
																				"values": {
																					"type": "array",
																					"items": {
																						"type": "string"
																					}
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"NUMBER"
																					]
																				},
																				"value": {
																					"type": "string"
																				},
																				"min": {
																					"type": "number"
																				},
																				"max": {
																					"type": "number"
																				},
																				"decimals": {
																					"type": "integer",
																					"minimum": 0,
																					"maximum": 6
																				},
																				"step": {
																					"type": "number",
																					"exclusiveMinimum": 0
																				},
																				"unit": {
																					"type": "string",
																					"maxLength": 12
																				}
																			},
																			"required": [
																				"type"
																			]
																		},
																		{
																			"type": "object",
																			"properties": {
																				"label": {
																					"type": "string"
																				},
																				"placeholder": {
																					"type": "string"
																				},
																				"description": {
																					"type": "string"
																				},
																				"partyId": {
																					"type": [
																						"string",
																						"null"
																					]
																				},
																				"required": {
																					"type": "boolean"
																				},
																				"type": {
																					"type": "string",
																					"enum": [
																						"ATTACHMENT"
																					]
																				},
																				"appendixLabel": {
																					"type": "string"
																				},
																				"allowedTypes": {
																					"type": "array",
																					"items": {
																						"type": "string",
																						"enum": [
																							"PDF",
																							"IMAGE"
																						]
																					}
																				},
																				"includeInDocument": {
																					"type": "boolean"
																				},
																				"value": {
																					"type": "object",
																					"properties": {
																						"filename": {
																							"type": "string"
																						},
																						"mimeType": {
																							"type": "string"
																						},
																						"size": {
																							"type": "number",
																							"description": "Size in bytes"
																						}
																					},
																					"required": [
																						"filename",
																						"mimeType",
																						"size"
																					],
																					"additionalProperties": {},
																					"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																				}
																			},
																			"required": [
																				"type"
																			]
																		}
																	]
																}
															},
															"required": [
																"id",
																"row",
																"column"
															]
														}
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type",
													"columns",
													"fields"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"PRODUCT_TABLE"
														]
													},
													"name": {
														"type": "string"
													},
													"enableName": {
														"type": "boolean"
													},
													"columns": {
														"type": "object",
														"additionalProperties": {
															"type": "object",
															"properties": {
																"name": {
																	"type": "string"
																},
																"originalName": {
																	"type": "string"
																},
																"enabled": {
																	"type": "boolean"
																},
																"key": {
																	"type": "string"
																},
																"settings": {
																	"type": "object",
																	"properties": {
																		"decimalPlaces": {
																			"type": "number"
																		},
																		"oneTimePayment": {
																			"type": "boolean"
																		},
																		"pricePrefix": {
																			"type": "string"
																		},
																		"priceSuffix": {
																			"type": "string"
																		},
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	}
																}
															},
															"required": [
																"name",
																"originalName",
																"enabled",
																"key",
																"settings"
															]
														}
													},
													"summaryLabels": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "string"
															},
															"vat": {
																"type": "string"
															},
															"total": {
																"type": "string"
															},
															"payable": {
																"type": "string"
															}
														},
														"required": [
															"subtotal",
															"vat",
															"total"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"type": "string"
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"selectedProductIds": {
														"type": "array",
														"items": {
															"type": "string"
														}
													},
													"recipientChoice": {
														"type": "object",
														"properties": {
															"selectedIds": {
																"type": "array",
																"items": {
																	"type": "string"
																}
															},
															"quantities": {
																"type": "object",
																"additionalProperties": {
																	"type": "number"
																}
															}
														},
														"required": [
															"selectedIds",
															"quantities"
														]
													},
													"payment": {
														"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
														"type": "object",
														"properties": {
															"enabled": {
																"type": "boolean"
															},
															"payerPartyId": {
																"description": "The party who pays. Without it, `selectionPartyId` pays.",
																"type": "string"
															},
															"basis": {
																"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																"type": "string",
																"enum": [
																	"ONE_TIME",
																	"FIRST_PERIOD"
																]
															},
															"percent": {
																"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																"type": "integer",
																"minimum": 1,
																"maximum": 100
															}
														},
														"required": [
															"enabled"
														]
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																},
																"showSubtotal": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name"
															]
														}
													},
													"discount": {
														"type": "object",
														"properties": {
															"type": {
																"type": "string",
																"enum": [
																	"PERCENT",
																	"AMOUNT"
																]
															},
															"value": {
																"type": "number"
															},
															"label": {
																"type": "string"
															}
														},
														"required": [
															"type",
															"value"
														]
													},
													"pricing": {
														"type": "object",
														"properties": {
															"pricesIncludeVat": {
																"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																"type": "boolean"
															},
															"defaultVatRate": {
																"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																"type": "number"
															},
															"showVatBreakdown": {
																"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																"type": "boolean"
															}
														}
													},
													"style": {
														"type": "object",
														"properties": {
															"border": {
																"type": "boolean"
															},
															"rounded": {
																"type": "boolean"
															}
														}
													},
													"currency": {
														"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
														"type": "string",
														"pattern": "^[A-Z]{3}$"
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"products": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": "string"
																},
																"price": {
																	"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																	"type": "number"
																},
																"unit": {
																	"type": "string"
																},
																"quantity": {
																	"type": "number"
																},
																"vat": {
																	"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																	"type": "number"
																},
																"optional": {
																	"type": "boolean"
																},
																"defaultSelected": {
																	"type": "boolean"
																},
																"quantityEditable": {
																	"type": "boolean"
																},
																"quantityMin": {
																	"type": "number"
																},
																"quantityMax": {
																	"type": "number"
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	]
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"sectionId": {
																	"type": "string"
																},
																"sku": {
																	"type": "string"
																},
																"productId": {
																	"type": "string"
																},
																"productType": {
																	"type": "string",
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT"
																	]
																}
															},
															"required": [
																"id",
																"name"
															]
														}
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type",
													"name",
													"columns",
													"products"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"TABLE"
														]
													},
													"columns": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT",
																		"NUMBER"
																	]
																}
															},
															"required": [
																"id",
																"name",
																"type"
															]
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string"
																},
																"cells": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"columnId": {
																				"type": "string"
																			},
																			"value": {
																				"type": [
																					"string",
																					"number"
																				]
																			}
																		},
																		"required": [
																			"columnId",
																			"value"
																		]
																	}
																}
															},
															"required": [
																"id",
																"cells"
															]
														}
													},
													"showHeaders": {
														"type": "boolean"
													},
													"style": {
														"type": "object",
														"properties": {
															"border": {
																"type": "boolean"
															},
															"rounded": {
																"type": "boolean"
															}
														}
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													},
													"visibilityRule": {
														"type": "object",
														"properties": {
															"customFieldId": {
																"type": "string",
																"minLength": 1
															},
															"equals": {
																"type": "string"
															},
															"mode": {
																"type": "string",
																"enum": [
																	"SHOW_WHEN",
																	"HIDE_WHEN"
																]
															}
														},
														"required": [
															"customFieldId",
															"equals",
															"mode"
														]
													},
													"hidden": {
														"type": "boolean"
													}
												},
												"required": [
													"type",
													"columns",
													"rows"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"SPACER"
														]
													},
													"size": {
														"type": "string",
														"enum": [
															"S",
															"M",
															"L",
															"XL"
														]
													},
													"locked": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"PAGE_BREAK"
														]
													},
													"locked": {
														"type": "boolean"
													}
												},
												"required": [
													"type"
												]
											},
											{
												"type": "object",
												"properties": {
													"type": {
														"type": "string",
														"enum": [
															"DURATION"
														]
													},
													"durationType": {
														"type": "string",
														"enum": [
															"NONE",
															"SINGLE_PERIOD",
															"RECURRING",
															"RECURRING_WITH_INITIAL",
															"NOT_SET"
														]
													},
													"period": {
														"type": "object",
														"properties": {
															"value": {
																"type": "integer",
																"exclusiveMinimum": 0,
																"maximum": 9007199254740991
															},
															"unit": {
																"type": "string",
																"enum": [
																	"DAY",
																	"WEEK",
																	"MONTH",
																	"YEAR"
																]
															}
														},
														"required": [
															"value",
															"unit"
														]
													},
													"noticePeriod": {
														"type": "object",
														"properties": {
															"value": {
																"type": "integer",
																"exclusiveMinimum": 0,
																"maximum": 9007199254740991
															},
															"unit": {
																"type": "string",
																"enum": [
																	"DAY",
																	"WEEK",
																	"MONTH",
																	"YEAR"
																]
															}
														},
														"required": [
															"value",
															"unit"
														]
													},
													"startDate": {
														"type": "string"
													},
													"endDate": {
														"type": "string"
													},
													"locked": {
														"type": "boolean"
													},
													"sectionStyle": {
														"type": "object",
														"properties": {
															"background": {
																"type": "string",
																"enum": [
																	"NONE",
																	"MUTED",
																	"TINT",
																	"ACCENT",
																	"DARK"
																]
															},
															"padding": {
																"type": "string",
																"enum": [
																	"NONE",
																	"SM",
																	"MD",
																	"LG"
																]
															},
															"bleed": {
																"type": "boolean"
															},
															"border": {
																"type": "boolean"
															}
														}
													}
												},
												"required": [
													"type"
												]
											}
										]
									}
								}
							},
							"example": {
								"type": "TEXT",
								"position": 0,
								"fieldMeta": {
									"type": "TEXT",
									"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>",
									"locked": false,
									"sectionStyle": {
										"background": "NONE",
										"padding": "NONE",
										"bleed": false,
										"border": false
									},
									"hidden": false
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique field identifier"
										},
										"documentId": {
											"description": "Document this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"templateId": {
											"description": "Template this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"TEXT",
												"HTML",
												"FORM",
												"PDF",
												"PRODUCT_TABLE",
												"TABLE",
												"SPACER",
												"PAGE_BREAK",
												"DURATION"
											],
											"description": "Field type"
										},
										"position": {
											"type": "number",
											"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
										},
										"fieldMeta": {
											"anyOf": [
												{
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"additionalProperties": false,
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		],
																		"additionalProperties": {}
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind",
																					"inputType"
																				],
																				"additionalProperties": {}
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind"
																				],
																				"additionalProperties": {}
																			}
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		],
																		"additionalProperties": false
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	],
																	"additionalProperties": false
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	],
																	"additionalProperties": false
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	],
																	"additionalProperties": false
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		],
																		"additionalProperties": false
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					],
																					"additionalProperties": false
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		],
																		"additionalProperties": false
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														}
													]
												},
												{
													"type": "null"
												}
											],
											"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
										},
										"createdAt": {
											"description": "Date and time when the field was created",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the field was last updated",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"templateId",
										"type",
										"position",
										"fieldMeta",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10009abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"templateId": null,
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"templateId": null,
									"type": "TEXT",
									"position": 0,
									"fieldMeta": {
										"type": "TEXT",
										"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "type",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			},
			"delete": {
				"description": "Deletes a field from a template. The response holds the ID of the deleted field.",
				"summary": "Delete a template content block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteTemplateContent",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted field"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the content block is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/content/{contentId}/placed-fields": {
			"patch": {
				"description": "Changes individual boxes on a template PDF field, the same way as `PATCH /api/v1/documents/{id}/content/{contentId}/placed-fields`, with `partyId` referring to a template party. The response is the updated field.",
				"summary": "Add, update, or remove boxes on a template PDF block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "contentId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The content block ID.",
						"example": "cm4k2x9p10009abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateTemplateContentPlacedFields",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"upsert": {
										"description": "Boxes to add or replace. A box whose `id` already exists on the field replaces that box and keeps its stacking order; any other box is added on top.",
										"maxItems": 500,
										"type": "array",
										"items": {
											"oneOf": [
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"description": "The content block ID."
														},
														"page": {
															"type": "integer",
															"minimum": 1,
															"maximum": 9007199254740991,
															"description": "The page the box is on, counted from 1."
														},
														"rect": {
															"type": "object",
															"properties": {
																"x": {
																	"type": "number"
																},
																"y": {
																	"type": "number"
																},
																"width": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"height": {
																	"type": "number",
																	"exclusiveMinimum": 0
																}
															},
															"required": [
																"x",
																"y",
																"width",
																"height"
															],
															"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
														},
														"pageWidth": {
															"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageHeight": {
															"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageRotation": {
															"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
															"anyOf": [
																{
																	"type": "number",
																	"enum": [
																		0
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		90
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		180
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		270
																	]
																}
															]
														},
														"name": {
															"type": "string"
														},
														"key": {
															"type": "string",
															"pattern": "^[a-z0-9_-]*$"
														},
														"locked": {
															"type": "boolean"
														},
														"style": {
															"type": "object",
															"properties": {
																"fontSize": {
																	"type": "number",
																	"minimum": 6,
																	"maximum": 72
																},
																"color": {
																	"type": "string",
																	"pattern": "^#[0-9a-fA-F]{6}$"
																},
																"bold": {
																	"type": "boolean"
																},
																"italic": {
																	"type": "boolean"
																},
																"align": {
																	"type": "string",
																	"enum": [
																		"LEFT",
																		"CENTER",
																		"RIGHT"
																	]
																}
															}
														},
														"kind": {
															"type": "string",
															"enum": [
																"INPUT"
															]
														},
														"inputType": {
															"type": "string",
															"enum": [
																"TEXT",
																"DATE",
																"CHECKBOX",
																"SELECT",
																"DRAW",
																"SIGNATURE",
																"INITIALS"
															]
														},
														"label": {
															"type": "string"
														},
														"fillSource": {
															"type": "string",
															"enum": [
																"SIGNER",
																"FIXED",
																"NONE",
																"VARIABLE"
															]
														},
														"partyId": {
															"type": "string",
															"description": "The party ID."
														},
														"variableId": {
															"type": "string"
														},
														"identity": {
															"type": "string",
															"enum": [
																"name",
																"ssn"
															]
														},
														"drawn": {
															"type": "boolean"
														},
														"required": {
															"type": "boolean"
														},
														"options": {
															"type": "array",
															"items": {
																"type": "string"
															}
														},
														"multiline": {
															"type": "boolean"
														},
														"format": {
															"type": "string",
															"enum": [
																"email",
																"phone",
																"personnummer",
																"orgnr",
																"number"
															]
														},
														"min": {
															"type": "number"
														},
														"max": {
															"type": "number"
														},
														"decimals": {
															"type": "integer",
															"minimum": 0,
															"maximum": 6
														},
														"step": {
															"type": "number",
															"exclusiveMinimum": 0
														},
														"unit": {
															"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
															"type": "string",
															"enum": [
																"RELATIVE",
																"POINTS"
															]
														},
														"origin": {
															"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
															"type": "string",
															"enum": [
																"TOP_LEFT",
																"BOTTOM_LEFT"
															]
														}
													},
													"required": [
														"id",
														"page",
														"rect",
														"kind",
														"inputType"
													]
												},
												{
													"type": "object",
													"properties": {
														"id": {
															"type": "string",
															"minLength": 1,
															"description": "The content block ID."
														},
														"page": {
															"type": "integer",
															"minimum": 1,
															"maximum": 9007199254740991,
															"description": "The page the box is on, counted from 1."
														},
														"rect": {
															"type": "object",
															"properties": {
																"x": {
																	"type": "number"
																},
																"y": {
																	"type": "number"
																},
																"width": {
																	"type": "number",
																	"exclusiveMinimum": 0
																},
																"height": {
																	"type": "number",
																	"exclusiveMinimum": 0
																}
															},
															"required": [
																"x",
																"y",
																"width",
																"height"
															],
															"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
														},
														"pageWidth": {
															"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageHeight": {
															"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
															"type": "number",
															"exclusiveMinimum": 0
														},
														"pageRotation": {
															"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
															"anyOf": [
																{
																	"type": "number",
																	"enum": [
																		0
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		90
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		180
																	]
																},
																{
																	"type": "number",
																	"enum": [
																		270
																	]
																}
															]
														},
														"name": {
															"type": "string"
														},
														"key": {
															"type": "string",
															"pattern": "^[a-z0-9_-]*$"
														},
														"locked": {
															"type": "boolean"
														},
														"style": {
															"type": "object",
															"properties": {
																"fontSize": {
																	"type": "number",
																	"minimum": 6,
																	"maximum": 72
																},
																"color": {
																	"type": "string",
																	"pattern": "^#[0-9a-fA-F]{6}$"
																},
																"bold": {
																	"type": "boolean"
																},
																"italic": {
																	"type": "boolean"
																},
																"align": {
																	"type": "string",
																	"enum": [
																		"LEFT",
																		"CENTER",
																		"RIGHT"
																	]
																}
															}
														},
														"kind": {
															"type": "string",
															"enum": [
																"STATIC"
															]
														},
														"content": {
															"type": "string"
														},
														"text": {
															"type": "string"
														},
														"unit": {
															"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
															"type": "string",
															"enum": [
																"RELATIVE",
																"POINTS"
															]
														},
														"origin": {
															"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
															"type": "string",
															"enum": [
																"TOP_LEFT",
																"BOTTOM_LEFT"
															]
														}
													},
													"required": [
														"id",
														"page",
														"rect",
														"kind"
													]
												}
											],
											"description": "A box placed on a page of a PDF field"
										}
									},
									"remove": {
										"default": [],
										"description": "Ids of boxes to remove from the field.",
										"maxItems": 500,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1
										}
									}
								}
							},
							"example": {
								"upsert": [
									{
										"id": "cm4k2x9p10009abcd1234efgh",
										"page": 1,
										"rect": {
											"x": 0.12,
											"y": 0.76,
											"width": 0.3,
											"height": 0.06
										},
										"pageWidth": 595.28,
										"pageHeight": 841.89,
										"pageRotation": 0,
										"name": "Anställningsvillkor",
										"key": "startdatum",
										"locked": false,
										"style": {
											"fontSize": 6,
											"color": "#2563EB",
											"bold": false,
											"italic": false,
											"align": "LEFT"
										},
										"kind": "INPUT",
										"inputType": "TEXT",
										"label": "Startdatum",
										"fillSource": "SIGNER",
										"partyId": "cm4k2x9p10004abcd1234efgh",
										"variableId": "startdatum",
										"identity": "name",
										"drawn": false,
										"required": true,
										"options": [
											"Heltid"
										],
										"multiline": false,
										"format": "email",
										"min": 1,
										"max": 1,
										"decimals": 1,
										"step": 1,
										"unit": "RELATIVE",
										"origin": "TOP_LEFT"
									}
								],
								"remove": [
									"Anställningsvillkor"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique field identifier"
										},
										"documentId": {
											"description": "Document this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"templateId": {
											"description": "Template this field belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"TEXT",
												"HTML",
												"FORM",
												"PDF",
												"PRODUCT_TABLE",
												"TABLE",
												"SPACER",
												"PAGE_BREAK",
												"DURATION"
											],
											"description": "Field type"
										},
										"position": {
											"type": "number",
											"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
										},
										"fieldMeta": {
											"anyOf": [
												{
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"additionalProperties": false,
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		],
																		"additionalProperties": {}
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind",
																					"inputType"
																				],
																				"additionalProperties": {}
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"additionalProperties": false,
																						"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																					},
																					"pageWidth": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						},
																						"additionalProperties": false
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"pageWidth",
																					"pageHeight",
																					"kind"
																				],
																				"additionalProperties": {}
																			}
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									],
																									"additionalProperties": false
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						],
																						"additionalProperties": false
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		],
																		"additionalProperties": false
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	],
																	"additionalProperties": false
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	],
																	"additionalProperties": false
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	],
																	"additionalProperties": false
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		],
																		"additionalProperties": false
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		],
																		"additionalProperties": false
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					],
																					"additionalProperties": false
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		],
																		"additionalProperties": false
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	],
																	"additionalProperties": false
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	],
																	"additionalProperties": false
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	},
																	"additionalProperties": false
																}
															},
															"required": [
																"type"
															],
															"additionalProperties": false
														}
													]
												},
												{
													"type": "null"
												}
											],
											"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
										},
										"createdAt": {
											"description": "Date and time when the field was created",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the field was last updated",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"documentId",
										"templateId",
										"type",
										"position",
										"fieldMeta",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10009abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"templateId": null,
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10009abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"templateId": null,
									"type": "TEXT",
									"position": 0,
									"fieldMeta": {
										"type": "TEXT",
										"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Content block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/document-categories": {
			"get": {
				"description": "Retrieve the document categories (Dokumenttyp) in the workspace, newest first.\n\nA category scopes which custom fields apply to a document. Use an `id` from this list as `documentMeta.documentCategoryId` when creating or updating a document, or as `templateMeta.documentCategoryId` on a template.",
				"summary": "List document categories",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only document categories created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only document categories created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only document categories updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only document categories updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentCategories",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique document category identifier"
													},
													"name": {
														"type": "string",
														"description": "Category name, e.g. \"Anställningsavtal\""
													},
													"customFieldIds": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "Custom field IDs scoped to this category, in display order. Empty when the category scopes none."
													},
													"createdAt": {
														"description": "Date and time when the category was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the category was last updated",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"name",
													"customFieldIds",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10017abcd1234efgh",
											"name": "Avtal",
											"customFieldIds": [
												"cm4k2x9p10016abcd1234efgh"
											],
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/tags": {
			"get": {
				"description": "Retrieve a paginated list of all tags in your organization.\n\nTags help organize and categorize documents, templates, and contacts.\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.",
				"summary": "List all tags",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only tags created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only tags created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only tags updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only tags updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getTags",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique tag identifier"
													},
													"name": {
														"type": "string",
														"description": "Tag name"
													},
													"color": {
														"type": "string",
														"description": "Tag color in hex format (e.g., #FF5733)"
													},
													"availableFor": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "Where this tag can be used: DOCUMENT, TEMPLATE, and/or CONTACT"
													},
													"createdAt": {
														"description": "Date and time when tag was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when tag was last updated",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"name",
													"color",
													"availableFor",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10010abcd1234efgh",
													"name": "Anställning",
													"color": "#16A34A",
													"availableFor": [
														"DOCUMENT",
														"TEMPLATE"
													],
													"createdAt": "2026-01-12T08:00:00.000Z",
													"updatedAt": "2026-01-12T08:00:00.000Z"
												}
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A",
											"availableFor": [
												"DOCUMENT",
												"TEMPLATE"
											],
											"createdAt": "2026-01-12T08:00:00.000Z",
											"updatedAt": "2026-01-12T08:00:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new tag for organizing documents, templates, or contacts.\n\n**Required Fields:**\n- `name` - Tag name (must be unique)\n- `availableFor` - Where tag can be used: DOCUMENT, TEMPLATE, or CONTACT\n\n**Optional Fields:**\n- `color` - Hex color code (e.g., #FF5733)",
				"summary": "Create a new tag",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createTag",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"description": "Tag name (required)"
									},
									"color": {
										"description": "Tag color in hex format (e.g., #FF5733)",
										"type": "string",
										"pattern": "^#[0-9A-F]{6}$"
									},
									"availableFor": {
										"minItems": 1,
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"TEMPLATE",
												"CONTACT"
											]
										},
										"description": "Where this tag can be used"
									}
								},
								"required": [
									"name",
									"availableFor"
								],
								"description": "Create tag request"
							},
							"example": {
								"name": "Anställning",
								"color": "#16A34A",
								"availableFor": [
									"DOCUMENT"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique tag identifier"
										},
										"name": {
											"type": "string",
											"description": "Tag name"
										},
										"color": {
											"type": "string",
											"description": "Tag color in hex format (e.g., #FF5733)"
										},
										"availableFor": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Where this tag can be used: DOCUMENT, TEMPLATE, and/or CONTACT"
										},
										"createdAt": {
											"description": "Date and time when tag was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when tag was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"color",
										"availableFor",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10010abcd1234efgh",
										"name": "Anställning",
										"color": "#16A34A",
										"availableFor": [
											"DOCUMENT",
											"TEMPLATE"
										],
										"createdAt": "2026-01-12T08:00:00.000Z",
										"updatedAt": "2026-01-12T08:00:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10010abcd1234efgh",
									"name": "Anställning",
									"color": "#16A34A",
									"availableFor": [
										"DOCUMENT",
										"TEMPLATE"
									],
									"createdAt": "2026-01-12T08:00:00.000Z",
									"updatedAt": "2026-01-12T08:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/tags/{id}": {
			"patch": {
				"description": "Update tag properties. Omit a field to keep its value.",
				"summary": "Update a tag",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The tag ID.",
						"example": "cm4k2x9p10010abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateTag",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1
									},
									"color": {
										"type": "string",
										"pattern": "^#[0-9A-F]{6}$"
									},
									"availableFor": {
										"minItems": 1,
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"TEMPLATE",
												"CONTACT"
											]
										}
									}
								}
							},
							"example": {
								"name": "Anställning",
								"color": "#16A34A",
								"availableFor": [
									"DOCUMENT"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique tag identifier"
										},
										"name": {
											"type": "string",
											"description": "Tag name"
										},
										"color": {
											"type": "string",
											"description": "Tag color in hex format (e.g., #FF5733)"
										},
										"availableFor": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "Where this tag can be used: DOCUMENT, TEMPLATE, and/or CONTACT"
										},
										"createdAt": {
											"description": "Date and time when tag was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when tag was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"color",
										"availableFor",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"example": {
										"id": "cm4k2x9p10010abcd1234efgh",
										"name": "Anställning",
										"color": "#16A34A",
										"availableFor": [
											"DOCUMENT",
											"TEMPLATE"
										],
										"createdAt": "2026-01-12T08:00:00.000Z",
										"updatedAt": "2026-01-12T08:00:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10010abcd1234efgh",
									"name": "Anställning",
									"color": "#16A34A",
									"availableFor": [
										"DOCUMENT",
										"TEMPLATE"
									],
									"createdAt": "2026-01-12T08:00:00.000Z",
									"updatedAt": "2026-01-12T08:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Tag not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "tag"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Deletes a tag and removes it from every document, template, and contact it was attached to.",
				"summary": "Delete a tag",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The tag ID.",
						"example": "cm4k2x9p10010abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteTag",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The tag ID."
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the tag is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10010abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Tag not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "tag"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/tags": {
			"post": {
				"description": "Associate a tag with a document, and return the document.\n\nThe tag's `availableFor` must include `DOCUMENT`.",
				"summary": "Add tag to document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "addTagToDocument",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"tagId": {
										"type": "string",
										"minLength": 1,
										"description": "The tag ID."
									}
								},
								"required": [
									"tagId"
								]
							},
							"example": {
								"tagId": "cm4k2x9p10010abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10010abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställning",
									"status": "DRAFT",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"completedAt": "2026-09-29T07:41:00.000Z",
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställning",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10010abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "tagId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Tag not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "tag"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/tags/{tagId}": {
			"delete": {
				"description": "Remove a tag association from a document, and return the document.",
				"summary": "Remove tag from document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "tagId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The tag ID.",
						"example": "cm4k2x9p10010abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "removeTagFromDocument",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique document identifier"
										},
										"externalId": {
											"description": "Your external reference ID for this document",
											"type": [
												"string",
												"null"
											]
										},
										"expiresAt": {
											"description": "Date and time when the document expires",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"name": {
											"type": "string",
											"description": "Document name/title"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING_APPROVAL",
												"PENDING",
												"COMPLETED",
												"EXPIRED",
												"CANCELLED",
												"REJECTED",
												"IMPORTED"
											],
											"description": "Document status"
										},
										"documentMeta": {
											"description": "Document metadata including subject, message, signing order, etc.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"subject": {
													"description": "Email subject line when sending document",
													"type": [
														"string",
														"null"
													]
												},
												"message": {
													"description": "Custom message included in signing invitation",
													"type": [
														"string",
														"null"
													]
												},
												"signingMode": {
													"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectUrl": {
													"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
													"type": [
														"string",
														"null"
													]
												},
												"redirectEnabled": {
													"description": "Whether redirect after signing is enabled",
													"type": [
														"boolean",
														"null"
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"signableAfterExpired": {
													"description": "Whether the document remains signable after its expiration date",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"aiChatEnabled": {
													"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
													"type": [
														"boolean",
														"null"
													]
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"subject",
												"message",
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"redirectUrl",
												"redirectEnabled",
												"internalRecipients",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"reminderIntervalDays",
												"allowDelegation",
												"openVerification",
												"aiChatEnabled",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"description": "Date and time when the document was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the document was last updated",
											"type": "string",
											"format": "date-time"
										},
										"completedAt": {
											"description": "Date and time when all signers completed signing",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"templateId": {
											"description": "ID of the template the document was created from, or null",
											"type": [
												"string",
												"null"
											]
										},
										"folderId": {
											"description": "ID of the folder that holds the document, or null at the top level",
											"type": [
												"string",
												"null"
											]
										},
										"responsibleUserId": {
											"description": "ID of the workspace member responsible for the document",
											"type": [
												"string",
												"null"
											]
										},
										"parties": {
											"description": "Array of document parties (signers and other participants).",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The party ID"
													},
													"documentId": {
														"type": "string",
														"description": "The ID of the document the party belongs to"
													},
													"email": {
														"description": "Signer email address",
														"type": [
															"string",
															"null"
														],
														"format": "email",
														"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
													},
													"name": {
														"type": "string",
														"description": "Signer full name"
													},
													"phone": {
														"description": "Signer phone number (for SMS notifications)",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "Your external reference ID for this signer",
														"type": [
															"string",
															"null"
														]
													},
													"contactId": {
														"description": "ID of the contact this party was created from, if any",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing (null for parallel)",
														"type": [
															"number",
															"null"
														]
													},
													"signedAt": {
														"description": "Date and time when the signer signed (null if not signed)",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"readStatus": {
														"type": "string",
														"enum": [
															"NOT_OPENED",
															"OPENED",
															"READ"
														],
														"description": "Read status: NOT_OPENED, OPENED, or READ"
													},
													"signingStatus": {
														"type": "string",
														"enum": [
															"NOT_SIGNED",
															"SIGNED",
															"REJECTED"
														],
														"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signatureMethod": {
														"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"openVerification": {
														"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"sendStatus": {
														"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NOT_SENT",
															"SENT",
															"DELIVERED",
															"BOUNCED",
															"FAILED",
															null
														]
													},
													"identityVerified": {
														"type": "boolean",
														"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
													},
													"identityMismatch": {
														"type": "boolean",
														"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
													},
													"createdAt": {
														"description": "When the party was added to the document",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"email",
													"name",
													"phone",
													"type",
													"company",
													"externalId",
													"contactId",
													"nationalId",
													"country",
													"role",
													"signingOrder",
													"signedAt",
													"readStatus",
													"signingStatus",
													"delivery",
													"signatureMethod",
													"signVerification",
													"openVerification",
													"sendStatus",
													"identityVerified",
													"identityMismatch",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											}
										},
										"customFields": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The custom field ID."
													},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														]
													},
													"value": {
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"value"
												],
												"additionalProperties": false
											}
										},
										"content": {
											"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"productTables": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"fieldId": {
														"type": "string",
														"description": "The content block ID."
													},
													"name": {
														"type": "string"
													},
													"currency": {
														"description": "ISO 4217; null on tables authored before currencies",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it"
														]
													},
													"allowSelection": {
														"type": "boolean"
													},
													"selectionPartyId": {
														"description": "The party who makes the selection",
														"type": [
															"string",
															"null"
														]
													},
													"selectionRequired": {
														"type": "boolean"
													},
													"sections": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The section ID."
																},
																"name": {
																	"type": "string"
																},
																"pickOne": {
																	"type": "boolean"
																}
															},
															"required": [
																"id",
																"name",
																"pickOne"
															],
															"additionalProperties": false
														}
													},
													"rows": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The product ID."
																},
																"sku": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"name": {
																	"type": "string"
																},
																"description": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"unit": {
																	"type": [
																		"string",
																		"null"
																	]
																},
																"price": {
																	"type": "number",
																	"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
																},
																"vat": {
																	"type": "number",
																	"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
																},
																"billing": {
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"MONTHLY",
																		"QUARTERLY",
																		"YEARLY"
																	]
																},
																"discount": {
																	"description": "Row discount, off the row amount",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	],
																	"additionalProperties": false
																},
																"optional": {
																	"type": "boolean",
																	"description": "The recipient may choose whether to include this row"
																},
																"selected": {
																	"type": "boolean",
																	"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
																},
																"quantity": {
																	"type": "number",
																	"description": "Final quantity, including a recipient-set one"
																},
																"lineTotal": {
																	"type": "number",
																	"description": "price × quantity − discount, in the basis the price was entered in"
																},
																"lineNet": {
																	"type": "number",
																	"description": "Line amount excluding VAT"
																},
																"lineVat": {
																	"type": "number",
																	"description": "VAT on the line"
																},
																"sectionId": {
																	"type": [
																		"string",
																		"null"
																	],
																	"description": "The section ID."
																},
																"productType": {
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"GOODS",
																		"SERVICE",
																		"ROT",
																		"RUT",
																		null
																	]
																}
															},
															"required": [
																"id",
																"sku",
																"name",
																"description",
																"unit",
																"price",
																"vat",
																"billing",
																"discount",
																"optional",
																"selected",
																"quantity",
																"lineTotal",
																"lineNet",
																"lineVat",
																"sectionId",
																"productType"
															],
															"additionalProperties": false
														},
														"description": "Every row, selected or not, in table order"
													},
													"totals": {
														"type": "object",
														"properties": {
															"subtotal": {
																"type": "number",
																"description": "Net, before the table discount"
															},
															"discountAmount": {
																"type": "number"
															},
															"vatAmount": {
																"type": "number"
															},
															"total": {
																"type": "number"
															},
															"rotDeduction": {
																"type": "number"
															},
															"rutDeduction": {
																"type": "number"
															},
															"payable": {
																"type": "number",
																"description": "total − ROT/RUT deductions"
															},
															"byBilling": {
																"type": "object",
																"additionalProperties": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "number"
																		},
																		"vatAmount": {
																			"type": "number"
																		},
																		"total": {
																			"type": "number"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vatAmount",
																		"total"
																	],
																	"additionalProperties": false
																}
															}
														},
														"required": [
															"subtotal",
															"discountAmount",
															"vatAmount",
															"total",
															"rotDeduction",
															"rutDeduction",
															"payable",
															"byBilling"
														],
														"additionalProperties": false,
														"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
													}
												},
												"required": [
													"fieldId",
													"name",
													"currency",
													"language",
													"allowSelection",
													"selectionPartyId",
													"selectionRequired",
													"sections",
													"rows",
													"totals"
												],
												"additionalProperties": false
											},
											"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
										},
										"approvalRequestId": {
											"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
											"type": [
												"string",
												"null"
											]
										},
										"bundleId": {
											"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"externalId",
										"expiresAt",
										"name",
										"status",
										"documentMeta",
										"createdAt",
										"updatedAt",
										"completedAt",
										"deletedAt",
										"templateId",
										"folderId",
										"responsibleUserId",
										"parties",
										"tags",
										"customFields",
										"content",
										"productTables",
										"approvalRequestId",
										"bundleId"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10010abcd1234efgh",
									"externalId": "HR-2026-0142",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"name": "Anställning",
									"status": "DRAFT",
									"documentMeta": {
										"subject": "Ditt anställningsavtal från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"redirectUrl": null,
										"redirectEnabled": true,
										"internalRecipients": [
											"hr@example.com"
										],
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"reminderIntervalDays": 3,
										"allowDelegation": false,
										"openVerification": "PIN",
										"aiChatEnabled": false,
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"completedAt": "2026-09-29T07:41:00.000Z",
									"deletedAt": null,
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"folderId": "cm4k2x9p10011abcd1234efgh",
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"email": "kai@example.com",
											"name": "Kai Lindqvist",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"company": null,
											"externalId": "HR-2026-0142",
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"nationalId": "191212121212",
											"country": "SE",
											"role": "SIGNER",
											"signingOrder": 1,
											"signedAt": "2026-09-29T07:41:00.000Z",
											"readStatus": "READ",
											"signingStatus": "SIGNED",
											"delivery": [
												"EMAIL"
											],
											"signatureMethod": "SE_BANKID",
											"signVerification": "PIN",
											"openVerification": "PIN",
											"sendStatus": "DELIVERED",
											"identityVerified": true,
											"identityMismatch": false,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"customFields": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "TEXT",
											"value": "2026-11-01"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"productTables": [
										{
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"name": "Anställning",
											"currency": "SEK",
											"language": "sv",
											"allowSelection": false,
											"selectionPartyId": "cm4k2x9p10004abcd1234efgh",
											"selectionRequired": false,
											"sections": [
												{
													"id": "cm4k2x9p10037abcd1234efgh",
													"name": "Utbildningar",
													"pickOne": false
												}
											],
											"rows": [
												{
													"id": "cm4k2x9p10036abcd1234efgh",
													"sku": "UTB-INTRO",
													"name": "Introduktionsutbildning",
													"description": "Introduktionsutbildning.",
													"unit": "st",
													"price": 4500,
													"vat": 25,
													"billing": "ONE_TIME",
													"discount": {
														"type": "PERCENT",
														"value": 1
													},
													"optional": false,
													"selected": false,
													"quantity": 1,
													"lineTotal": 1,
													"lineNet": 1,
													"lineVat": 1,
													"sectionId": "cm4k2x9p10037abcd1234efgh",
													"productType": "GOODS"
												}
											],
											"totals": {
												"subtotal": 4500,
												"discountAmount": 1,
												"vatAmount": 1125,
												"total": 1,
												"rotDeduction": 1,
												"rutDeduction": 1,
												"payable": 5625,
												"byBilling": {
													"ONE_TIME": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"MONTHLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"QUARTERLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													},
													"YEARLY": {
														"subtotal": 4500,
														"vatAmount": 1125,
														"total": 1
													}
												}
											}
										}
									],
									"approvalRequestId": "cm4k2x9p10010abcd1234efgh",
									"bundleId": "cm4k2x9p10044abcd1234efgh"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Tag not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "tag"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/links": {
			"get": {
				"description": "List a document's links to other documents, in both directions.\n\n**Link types:** AMENDS, REPLACES, RENEWS, RELATES_TO — the from-document acts on the to-document.\n\n**Direction:** FROM means this document is the acting end of the link; TO means another document links to it.\n\nLinks whose other end you don't have access to are omitted. A trashed target is returned with `target: null`.",
				"summary": "List document links",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentLinks",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Link ID"
													},
													"fromDocumentId": {
														"type": "string",
														"description": "ID of the document that acts on the other one. For `RELATES_TO`, which has no direction, either end."
													},
													"toDocumentId": {
														"type": "string",
														"description": "ID of the document the from-document acts on"
													},
													"linkType": {
														"type": "string",
														"enum": [
															"AMENDS",
															"REPLACES",
															"RENEWS",
															"RELATES_TO"
														],
														"description": "How the documents relate: the from-document AMENDS/REPLACES/RENEWS/RELATES_TO the to-document"
													},
													"direction": {
														"type": "string",
														"enum": [
															"FROM",
															"TO"
														],
														"description": "Which end of the link this document is — FROM means this document is the acting/newer one"
													},
													"origin": {
														"description": "How the link was created: `MANUAL`, `DUPLICATE`, or `RENEWAL`",
														"type": [
															"string",
															"null"
														]
													},
													"createdAt": {
														"description": "When the link was created",
														"type": "string",
														"format": "date-time"
													},
													"target": {
														"description": "The other end of the link; null when that document has been moved to trash",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "The other document's ID"
															},
															"name": {
																"type": "string",
																"description": "The other document's name"
															},
															"status": {
																"type": "string",
																"enum": [
																	"DRAFT",
																	"PENDING_APPROVAL",
																	"PENDING",
																	"COMPLETED",
																	"EXPIRED",
																	"CANCELLED",
																	"REJECTED",
																	"IMPORTED"
																],
																"description": "The other document's status"
															},
															"workspaceId": {
																"type": "string",
																"description": "The other document's workspace"
															}
														},
														"required": [
															"id",
															"name",
															"status",
															"workspaceId"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"id",
													"fromDocumentId",
													"toDocumentId",
													"linkType",
													"direction",
													"origin",
													"createdAt",
													"target"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10021abcd1234efgh",
											"fromDocumentId": "cm4k2x9p10003abcd1234efgh",
											"toDocumentId": "cm4k2x9p10022abcd1234efgh",
											"linkType": "AMENDS",
											"direction": "FROM",
											"origin": "manual",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"target": {
												"id": "cm4k2x9p10022abcd1234efgh",
												"name": "Sekretessavtal – Kai Lindqvist",
												"status": "COMPLETED",
												"workspaceId": "cm4k2x9p10001abcd1234efgh"
											}
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document link not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "link"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a link from this document to another document in the same organization.\n\n**Required Fields:**\n- `toDocumentId` - The document to link to\n- `linkType` - AMENDS, REPLACES, RENEWS or RELATES_TO (this document acts on the target)\n\nBoth documents must be accessible to the acting user. RELATES_TO is symmetric — the same pair can only be related once regardless of direction.\n\n**Response:** Returns the link in the shape of an item from `GET /api/v1/documents/:id/links`.",
				"summary": "Link document to another document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createDocumentLink",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"toDocumentId": {
										"type": "string",
										"minLength": 1,
										"description": "The document to link to (the older/passive end)"
									},
									"linkType": {
										"type": "string",
										"enum": [
											"AMENDS",
											"REPLACES",
											"RENEWS",
											"RELATES_TO"
										],
										"description": "How this document relates to the target"
									}
								},
								"required": [
									"toDocumentId",
									"linkType"
								]
							},
							"example": {
								"toDocumentId": "cm4k2x9p10022abcd1234efgh",
								"linkType": "AMENDS"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Link ID"
										},
										"fromDocumentId": {
											"type": "string",
											"description": "ID of the document that acts on the other one. For `RELATES_TO`, which has no direction, either end."
										},
										"toDocumentId": {
											"type": "string",
											"description": "ID of the document the from-document acts on"
										},
										"linkType": {
											"type": "string",
											"enum": [
												"AMENDS",
												"REPLACES",
												"RENEWS",
												"RELATES_TO"
											],
											"description": "How the documents relate: the from-document AMENDS/REPLACES/RENEWS/RELATES_TO the to-document"
										},
										"direction": {
											"type": "string",
											"enum": [
												"FROM",
												"TO"
											],
											"description": "Which end of the link this document is — FROM means this document is the acting/newer one"
										},
										"origin": {
											"description": "How the link was created: `MANUAL`, `DUPLICATE`, or `RENEWAL`",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"description": "When the link was created",
											"type": "string",
											"format": "date-time"
										},
										"target": {
											"description": "The other end of the link; null when that document has been moved to trash",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The other document's ID"
												},
												"name": {
													"type": "string",
													"description": "The other document's name"
												},
												"status": {
													"type": "string",
													"enum": [
														"DRAFT",
														"PENDING_APPROVAL",
														"PENDING",
														"COMPLETED",
														"EXPIRED",
														"CANCELLED",
														"REJECTED",
														"IMPORTED"
													],
													"description": "The other document's status"
												},
												"workspaceId": {
													"type": "string",
													"description": "The other document's workspace"
												}
											},
											"required": [
												"id",
												"name",
												"status",
												"workspaceId"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"fromDocumentId",
										"toDocumentId",
										"linkType",
										"direction",
										"origin",
										"createdAt",
										"target"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10021abcd1234efgh",
									"fromDocumentId": "cm4k2x9p10003abcd1234efgh",
									"toDocumentId": "cm4k2x9p10022abcd1234efgh",
									"linkType": "AMENDS",
									"direction": "FROM",
									"origin": "manual",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"target": {
										"id": "cm4k2x9p10022abcd1234efgh",
										"name": "Sekretessavtal – Kai Lindqvist",
										"status": "COMPLETED",
										"workspaceId": "cm4k2x9p10001abcd1234efgh"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "toDocumentId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document link not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "link"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/links/{linkId}": {
			"delete": {
				"description": "Remove a link between two documents. Requires edit access to either end of the link.\n\n**Response:** Returns `{ id, deleted: true }`.",
				"summary": "Remove a document link",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "linkId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document link ID.",
						"example": "cm4k2x9p10021abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteDocumentLink",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the removed link"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the document link is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10021abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Document link not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "link"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/custom-fields": {
			"get": {
				"description": "Retrieve a paginated list of custom field definitions.\n\nCustom fields allow you to add additional structured data to documents or contacts.\n\nFilter by `type` (DOCUMENT or CONTACT). The newest custom fields come first.\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.",
				"summary": "List all custom fields",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "type",
						"in": "query",
						"description": "Returns only custom fields of this type.",
						"schema": {
							"type": "string",
							"enum": [
								"DOCUMENT",
								"CONTACT"
							]
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only custom fields created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only custom fields created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only custom fields updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only custom fields updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getCustomFields",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique custom field identifier"
													},
													"name": {
														"type": "string",
														"description": "Custom field name"
													},
													"type": {
														"type": "string",
														"enum": [
															"DOCUMENT",
															"CONTACT"
														],
														"description": "Field type: DOCUMENT or CONTACT"
													},
													"inputType": {
														"type": "string",
														"enum": [
															"TEXT",
															"NUMBER",
															"DATE",
															"EMAIL",
															"PHONE",
															"URL",
															"BOOLEAN",
															"SELECT",
															"JSON",
															"TEXTAREA"
														],
														"description": "Input type: TEXT, NUMBER, DATE, BOOLEAN, SELECT, TEXTAREA, EMAIL, PHONE, URL, or JSON"
													},
													"defaultValue": {
														"description": "Default value for this field",
														"type": [
															"string",
															"null"
														]
													},
													"required": {
														"type": "boolean",
														"description": "Whether this field is required"
													},
													"options": {
														"description": "The options of a SELECT field, for example `[\"Small\",\"Large\"]`. Null for other input types.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "string"
														}
													},
													"createdAt": {
														"description": "Date and time when custom field was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when custom field was last updated",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"inputType",
													"defaultValue",
													"required",
													"options",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10016abcd1234efgh",
											"name": "Startdatum",
											"type": "DOCUMENT",
											"inputType": "TEXT",
											"defaultValue": "2026-11-01",
											"required": true,
											"options": [
												"Heltid"
											],
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new custom field definition.\n\n**Required Fields:**\n- `name` - Field name\n- `type` - DOCUMENT or CONTACT\n- `inputType` - Input type (TEXT, NUMBER, DATE, BOOLEAN, SELECT, TEXTAREA, EMAIL, PHONE, URL, JSON)\n\n**Optional Fields:**\n- `defaultValue` - Default value for the field\n- `required` - Whether field is required (default: false)\n- `options` - For SELECT type, the options as an array of strings, for example `[\"Small\",\"Large\"]`",
				"summary": "Create a custom field definition",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createCustomField",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"description": "Custom field name (required)"
									},
									"type": {
										"type": "string",
										"enum": [
											"DOCUMENT",
											"CONTACT"
										],
										"description": "Field type: DOCUMENT or CONTACT (required)"
									},
									"inputType": {
										"type": "string",
										"enum": [
											"TEXT",
											"NUMBER",
											"DATE",
											"EMAIL",
											"PHONE",
											"URL",
											"BOOLEAN",
											"SELECT",
											"JSON",
											"TEXTAREA"
										],
										"description": "Input type (required): TEXT, NUMBER, DATE, CHECKBOX, SELECT, TEXTAREA, EMAIL, PHONE, or URL"
									},
									"defaultValue": {
										"description": "Default value for this field",
										"type": [
											"string",
											"null"
										]
									},
									"required": {
										"default": false,
										"description": "Whether this field is required (default: false)",
										"type": "boolean"
									},
									"options": {
										"description": "The options of a SELECT field, for example `[\"Small\",\"Large\"]`. Required for SELECT.",
										"type": [
											"array",
											"null"
										],
										"items": {
											"type": "string"
										}
									}
								},
								"required": [
									"name",
									"type",
									"inputType"
								],
								"description": "Create custom field request"
							},
							"example": {
								"name": "Startdatum",
								"type": "DOCUMENT",
								"inputType": "TEXT",
								"defaultValue": "2026-11-01",
								"required": false,
								"options": [
									"Heltid"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique custom field identifier"
										},
										"name": {
											"type": "string",
											"description": "Custom field name"
										},
										"type": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"CONTACT"
											],
											"description": "Field type: DOCUMENT or CONTACT"
										},
										"inputType": {
											"type": "string",
											"enum": [
												"TEXT",
												"NUMBER",
												"DATE",
												"EMAIL",
												"PHONE",
												"URL",
												"BOOLEAN",
												"SELECT",
												"JSON",
												"TEXTAREA"
											],
											"description": "Input type: TEXT, NUMBER, DATE, BOOLEAN, SELECT, TEXTAREA, EMAIL, PHONE, URL, or JSON"
										},
										"defaultValue": {
											"description": "Default value for this field",
											"type": [
												"string",
												"null"
											]
										},
										"required": {
											"type": "boolean",
											"description": "Whether this field is required"
										},
										"options": {
											"description": "The options of a SELECT field, for example `[\"Small\",\"Large\"]`. Null for other input types.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "string"
											}
										},
										"createdAt": {
											"description": "Date and time when custom field was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when custom field was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"type",
										"inputType",
										"defaultValue",
										"required",
										"options",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10016abcd1234efgh",
									"name": "Startdatum",
									"type": "DOCUMENT",
									"inputType": "TEXT",
									"defaultValue": "2026-11-01",
									"required": true,
									"options": [
										"Heltid"
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/custom-fields/{id}": {
			"get": {
				"description": "Retrieve detailed information about a custom field definition.",
				"summary": "Get a custom field by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The custom field ID.",
						"example": "cm4k2x9p10016abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getCustomField",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique custom field identifier"
										},
										"name": {
											"type": "string",
											"description": "Custom field name"
										},
										"type": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"CONTACT"
											],
											"description": "Field type: DOCUMENT or CONTACT"
										},
										"inputType": {
											"type": "string",
											"enum": [
												"TEXT",
												"NUMBER",
												"DATE",
												"EMAIL",
												"PHONE",
												"URL",
												"BOOLEAN",
												"SELECT",
												"JSON",
												"TEXTAREA"
											],
											"description": "Input type: TEXT, NUMBER, DATE, BOOLEAN, SELECT, TEXTAREA, EMAIL, PHONE, URL, or JSON"
										},
										"defaultValue": {
											"description": "Default value for this field",
											"type": [
												"string",
												"null"
											]
										},
										"required": {
											"type": "boolean",
											"description": "Whether this field is required"
										},
										"options": {
											"description": "The options of a SELECT field, for example `[\"Small\",\"Large\"]`. Null for other input types.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "string"
											}
										},
										"createdAt": {
											"description": "Date and time when custom field was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when custom field was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"type",
										"inputType",
										"defaultValue",
										"required",
										"options",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10016abcd1234efgh",
									"name": "Startdatum",
									"type": "DOCUMENT",
									"inputType": "TEXT",
									"defaultValue": "2026-11-01",
									"required": true,
									"options": [
										"Heltid"
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Custom field not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "custom_field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"patch": {
				"description": "Update custom field properties. Omit a field to keep its value, or pass `null` to clear `defaultValue` or `options`.",
				"summary": "Update a custom field definition",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The custom field ID.",
						"example": "cm4k2x9p10016abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateCustomField",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1
									},
									"inputType": {
										"type": "string",
										"enum": [
											"TEXT",
											"NUMBER",
											"DATE",
											"EMAIL",
											"PHONE",
											"URL",
											"BOOLEAN",
											"SELECT",
											"JSON",
											"TEXTAREA"
										]
									},
									"defaultValue": {
										"type": [
											"string",
											"null"
										]
									},
									"required": {
										"type": "boolean"
									},
									"options": {
										"description": "The options of a SELECT field, for example `[\"Small\",\"Large\"]`. Required for SELECT.",
										"type": [
											"array",
											"null"
										],
										"items": {
											"type": "string"
										}
									}
								}
							},
							"example": {
								"name": "Startdatum",
								"inputType": "TEXT",
								"defaultValue": "2026-11-01",
								"required": true,
								"options": [
									"Heltid"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique custom field identifier"
										},
										"name": {
											"type": "string",
											"description": "Custom field name"
										},
										"type": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"CONTACT"
											],
											"description": "Field type: DOCUMENT or CONTACT"
										},
										"inputType": {
											"type": "string",
											"enum": [
												"TEXT",
												"NUMBER",
												"DATE",
												"EMAIL",
												"PHONE",
												"URL",
												"BOOLEAN",
												"SELECT",
												"JSON",
												"TEXTAREA"
											],
											"description": "Input type: TEXT, NUMBER, DATE, BOOLEAN, SELECT, TEXTAREA, EMAIL, PHONE, URL, or JSON"
										},
										"defaultValue": {
											"description": "Default value for this field",
											"type": [
												"string",
												"null"
											]
										},
										"required": {
											"type": "boolean",
											"description": "Whether this field is required"
										},
										"options": {
											"description": "The options of a SELECT field, for example `[\"Small\",\"Large\"]`. Null for other input types.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "string"
											}
										},
										"createdAt": {
											"description": "Date and time when custom field was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when custom field was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"type",
										"inputType",
										"defaultValue",
										"required",
										"options",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10016abcd1234efgh",
									"name": "Startdatum",
									"type": "DOCUMENT",
									"inputType": "TEXT",
									"defaultValue": "2026-11-01",
									"required": true,
									"options": [
										"Heltid"
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Custom field not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "custom_field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Delete a custom field definition.\n\n**Warning:** This will remove all values associated with this field from all documents/contacts.",
				"summary": "Delete a custom field definition",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The custom field ID.",
						"example": "cm4k2x9p10016abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteCustomField",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted custom field"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the custom field is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10016abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Custom field not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "custom_field"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:delete"
						]
					}
				]
			}
		},
		"/api/v1/identity-checks": {
			"get": {
				"description": "Lists the sajn ID identity checks in your workspace, newest first. An identity check asks a person to verify who they are with BankID, matched against their national identity number or, without one, their name.\n\nFilter by `status`, `createdAfter` and `createdBefore`. Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.",
				"summary": "List identity checks",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "status",
						"in": "query",
						"description": "Filter by status. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"CREATED",
									"SENT",
									"OPENED",
									"VERIFIED",
									"FAILED",
									"EXPIRED",
									"CANCELLED"
								],
								"description": "sajn ID Status:\n- CREATED: Verification created but not sent\n- SENT: Verification sent to recipient\n- OPENED: Recipient opened verification link\n- VERIFIED: Identity successfully verified\n- FAILED: Verification failed\n- EXPIRED: Verification link expired\n- CANCELLED: Verification was cancelled"
							}
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only checks created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only checks created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only checks updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only checks updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getIdentityChecks",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The identity check ID."
													},
													"organizationId": {
														"type": "string",
														"description": "The organization ID."
													},
													"fullName": {
														"type": "string",
														"description": "Full name of the person to verify."
													},
													"email": {
														"description": "Email address the link goes to on the `EMAIL` channel.",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Phone number the link goes to on the `SMS` channel.",
														"type": [
															"string",
															"null"
														]
													},
													"channel": {
														"type": "string",
														"enum": [
															"EMAIL",
															"SMS",
															"IN_APP"
														],
														"description": "How the recipient got the verification link."
													},
													"status": {
														"type": "string",
														"enum": [
															"CREATED",
															"SENT",
															"OPENED",
															"VERIFIED",
															"FAILED",
															"EXPIRED",
															"CANCELLED"
														],
														"description": "sajn ID Status:\n- CREATED: Verification created but not sent\n- SENT: Verification sent to recipient\n- OPENED: Recipient opened verification link\n- VERIFIED: Identity successfully verified\n- FAILED: Verification failed\n- EXPIRED: Verification link expired\n- CANCELLED: Verification was cancelled"
													},
													"reference": {
														"description": "Your own reference for the check.",
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"description": "ISO 639-1 language code, such as `sv` or `en`. `GET /api/v1/helpers/languages` lists them.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"sv",
															"en",
															"no",
															"da",
															"fi",
															"de",
															"is",
															"es",
															"fr",
															"it",
															null
														]
													},
													"expiresAt": {
														"description": "When the identity check and its link expire.",
														"type": "string",
														"format": "date-time"
													},
													"verifiedAt": {
														"description": "When the person was verified. Null until then.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the identity check was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the identity check was last updated."
													},
													"verificationUrl": {
														"description": "The verification link. Set only in the response to the create request; null otherwise.",
														"type": [
															"string",
															"null"
														]
													},
													"contact": {
														"description": "The contact the check is linked to.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "The contact ID."
															},
															"firstName": {
																"type": "string"
															},
															"lastName": {
																"type": "string"
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															},
															"phone": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"firstName",
															"lastName",
															"email",
															"phone"
														],
														"additionalProperties": false
													},
													"createdBy": {
														"description": "A sajn user",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false
													},
													"audits": {
														"description": "What happened to the check, newest first. Null in lists and in the response to the create request.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "Audit log entry ID"
																},
																"type": {
																	"type": "string",
																	"description": "Event type (e.g., ID_CREATED, ID_SENT, ID_VERIFIED)"
																},
																"createdAt": {
																	"description": "When this event occurred",
																	"type": "string",
																	"format": "date-time"
																},
																"data": {
																	"type": "object",
																	"additionalProperties": {},
																	"description": "Event-specific data"
																},
																"name": {
																	"description": "Name of person who triggered this event",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"email": {
																	"description": "Email of person who triggered this event",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"ipAddress": {
																	"description": "IP address of request",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"userAgent": {
																	"description": "User agent of request",
																	"type": [
																		"string",
																		"null"
																	]
																}
															},
															"required": [
																"id",
																"type",
																"createdAt",
																"data",
																"name",
																"email",
																"ipAddress",
																"userAgent"
															],
															"additionalProperties": false
														}
													},
													"data": {
														"description": "Verification data, such as the BankID result. Null in lists and in the response to the create request.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {}
													}
												},
												"required": [
													"id",
													"organizationId",
													"fullName",
													"email",
													"phone",
													"channel",
													"status",
													"reference",
													"language",
													"expiresAt",
													"verifiedAt",
													"createdAt",
													"updatedAt",
													"verificationUrl",
													"contact",
													"createdBy",
													"audits",
													"data"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10025abcd1234efgh",
											"organizationId": "cm4k2x9p10000abcd1234efgh",
											"fullName": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"channel": "EMAIL",
											"status": "VERIFIED",
											"reference": "HR-2026-0142",
											"language": "sv",
											"expiresAt": "2026-10-28T22:00:00.000Z",
											"verifiedAt": "2026-09-29T07:41:00.000Z",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"verificationUrl": "https://app.sajn.se/id/cm4k2x9p10025abcd1234efgh",
											"contact": {
												"id": "cm4k2x9p10006abcd1234efgh",
												"firstName": "Kai",
												"lastName": "Lindqvist",
												"email": "kai@example.com",
												"phone": "+46701740605"
											},
											"createdBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"audits": [
												{
													"id": "cm4k2x9p10038abcd1234efgh",
													"type": "VERIFICATION_COMPLETED",
													"createdAt": "2026-09-28T09:12:00.000Z",
													"data": {
														"partyId": "cm4k2x9p10004abcd1234efgh",
														"signatureType": "SE_BANKID"
													},
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"ipAddress": "192.0.2.10",
													"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15"
												}
											],
											"data": {
												"partyId": "cm4k2x9p10004abcd1234efgh",
												"signatureType": "SE_BANKID"
											}
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires sajnid:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"sajnid:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"sajnid:read"
						]
					}
				]
			},
			"post": {
				"description": "Creates an identity check and sends its link to the person over `channel`: `EMAIL` needs `email` and `SMS` needs `phone`.\n\nWith `nationalId`, BankID verifies that the person's national identity number matches it. Without it, BankID verifies that their name matches `fullName`.\n\nThe response is the only one that includes `verificationUrl` and `token`. Each check counts toward your monthly identity check quota.",
				"summary": "Create an identity check",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createIdentityCheck",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"fullName": {
										"type": "string",
										"minLength": 1,
										"description": "Full name of the person to verify (required)"
									},
									"email": {
										"description": "Email address to send the link to. Required on the `EMAIL` channel.",
										"type": "string",
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"phone": {
										"description": "Phone number to send the link to. Required on the `SMS` channel.",
										"type": "string",
										"minLength": 1
									},
									"channel": {
										"type": "string",
										"enum": [
											"EMAIL",
											"SMS"
										],
										"description": "How the recipient gets the verification link: `EMAIL` or `SMS`."
									},
									"reference": {
										"description": "Optional reference/external ID for tracking",
										"type": "string"
									},
									"contactId": {
										"description": "Optional contact ID to link this verification to",
										"type": "string"
									},
									"expiresAt": {
										"description": "When the identity check and its link expire. Must be in the future. Default: 7 days after creation.",
										"type": "string",
										"format": "date-time"
									},
									"language": {
										"description": "Language of the verification messages. Default: `sv`.",
										"type": "string",
										"enum": [
											"sv",
											"en",
											"no",
											"da",
											"fi",
											"de",
											"is",
											"es",
											"fr",
											"it"
										]
									},
									"nationalId": {
										"description": "National identity number, such as a Swedish personnummer. When set, BankID verifies that it matches; otherwise BankID verifies the name.",
										"type": "string"
									}
								},
								"required": [
									"fullName",
									"channel"
								]
							},
							"example": {
								"fullName": "Kai Lindqvist",
								"email": "kai@example.com",
								"phone": "+46701740605",
								"channel": "EMAIL",
								"reference": "HR-2026-0142",
								"contactId": "cm4k2x9p10006abcd1234efgh",
								"expiresAt": "2026-10-28T22:00:00.000Z",
								"language": "sv",
								"nationalId": "191212121212"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The identity check ID."
										},
										"organizationId": {
											"type": "string",
											"description": "The organization ID."
										},
										"fullName": {
											"type": "string",
											"description": "Full name of the person to verify."
										},
										"email": {
											"description": "Email address the link goes to on the `EMAIL` channel.",
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"description": "Phone number the link goes to on the `SMS` channel.",
											"type": [
												"string",
												"null"
											]
										},
										"channel": {
											"type": "string",
											"enum": [
												"EMAIL",
												"SMS",
												"IN_APP"
											],
											"description": "How the recipient got the verification link."
										},
										"status": {
											"type": "string",
											"enum": [
												"CREATED",
												"SENT",
												"OPENED",
												"VERIFIED",
												"FAILED",
												"EXPIRED",
												"CANCELLED"
											],
											"description": "sajn ID Status:\n- CREATED: Verification created but not sent\n- SENT: Verification sent to recipient\n- OPENED: Recipient opened verification link\n- VERIFIED: Identity successfully verified\n- FAILED: Verification failed\n- EXPIRED: Verification link expired\n- CANCELLED: Verification was cancelled"
										},
										"reference": {
											"description": "Your own reference for the check.",
											"type": [
												"string",
												"null"
											]
										},
										"language": {
											"description": "ISO 639-1 language code, such as `sv` or `en`. `GET /api/v1/helpers/languages` lists them.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it",
												null
											]
										},
										"expiresAt": {
											"description": "When the identity check and its link expire.",
											"type": "string",
											"format": "date-time"
										},
										"verifiedAt": {
											"description": "When the person was verified. Null until then.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the identity check was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the identity check was last updated."
										},
										"verificationUrl": {
											"description": "The verification link. Set only in the response to the create request; null otherwise.",
											"type": [
												"string",
												"null"
											]
										},
										"contact": {
											"description": "The contact the check is linked to.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The contact ID."
												},
												"firstName": {
													"type": "string"
												},
												"lastName": {
													"type": "string"
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												},
												"phone": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"firstName",
												"lastName",
												"email",
												"phone"
											],
											"additionalProperties": false
										},
										"createdBy": {
											"description": "A sajn user",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false
										},
										"audits": {
											"description": "What happened to the check, newest first. Null in lists and in the response to the create request.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Audit log entry ID"
													},
													"type": {
														"type": "string",
														"description": "Event type (e.g., ID_CREATED, ID_SENT, ID_VERIFIED)"
													},
													"createdAt": {
														"description": "When this event occurred",
														"type": "string",
														"format": "date-time"
													},
													"data": {
														"type": "object",
														"additionalProperties": {},
														"description": "Event-specific data"
													},
													"name": {
														"description": "Name of person who triggered this event",
														"type": [
															"string",
															"null"
														]
													},
													"email": {
														"description": "Email of person who triggered this event",
														"type": [
															"string",
															"null"
														]
													},
													"ipAddress": {
														"description": "IP address of request",
														"type": [
															"string",
															"null"
														]
													},
													"userAgent": {
														"description": "User agent of request",
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"type",
													"createdAt",
													"data",
													"name",
													"email",
													"ipAddress",
													"userAgent"
												],
												"additionalProperties": false
											}
										},
										"data": {
											"description": "Verification data, such as the BankID result. Null in lists and in the response to the create request.",
											"type": [
												"object",
												"null"
											],
											"additionalProperties": {}
										}
									},
									"required": [
										"id",
										"organizationId",
										"fullName",
										"email",
										"phone",
										"channel",
										"status",
										"reference",
										"language",
										"expiresAt",
										"verifiedAt",
										"createdAt",
										"updatedAt",
										"verificationUrl",
										"contact",
										"createdBy",
										"audits",
										"data"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10025abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"fullName": "Kai Lindqvist",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"channel": "EMAIL",
									"status": "VERIFIED",
									"reference": "HR-2026-0142",
									"language": "sv",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"verifiedAt": "2026-09-29T07:41:00.000Z",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"verificationUrl": "https://app.sajn.se/id/cm4k2x9p10025abcd1234efgh",
									"contact": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"email": "kai@example.com",
										"phone": "+46701740605"
									},
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"audits": [
										{
											"id": "cm4k2x9p10038abcd1234efgh",
											"type": "VERIFICATION_COMPLETED",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"data": {
												"partyId": "cm4k2x9p10004abcd1234efgh",
												"signatureType": "SE_BANKID"
											},
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"ipAddress": "192.0.2.10",
											"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15"
										}
									],
									"data": {
										"partyId": "cm4k2x9p10004abcd1234efgh",
										"signatureType": "SE_BANKID"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "fullName",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires sajnid:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"sajnid:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Identity check not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "sajn_id"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"sajnid:write"
						]
					}
				]
			}
		},
		"/api/v1/identity-checks/{id}": {
			"get": {
				"description": "Returns one identity check, with its audit log and verification data, such as the BankID result. The national identity number is encrypted and never returned.",
				"summary": "Get an identity check",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The identity check ID.",
						"example": "cm4k2x9p10025abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getIdentityCheck",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The identity check ID."
										},
										"organizationId": {
											"type": "string",
											"description": "The organization ID."
										},
										"fullName": {
											"type": "string",
											"description": "Full name of the person to verify."
										},
										"email": {
											"description": "Email address the link goes to on the `EMAIL` channel.",
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"description": "Phone number the link goes to on the `SMS` channel.",
											"type": [
												"string",
												"null"
											]
										},
										"channel": {
											"type": "string",
											"enum": [
												"EMAIL",
												"SMS",
												"IN_APP"
											],
											"description": "How the recipient got the verification link."
										},
										"status": {
											"type": "string",
											"enum": [
												"CREATED",
												"SENT",
												"OPENED",
												"VERIFIED",
												"FAILED",
												"EXPIRED",
												"CANCELLED"
											],
											"description": "sajn ID Status:\n- CREATED: Verification created but not sent\n- SENT: Verification sent to recipient\n- OPENED: Recipient opened verification link\n- VERIFIED: Identity successfully verified\n- FAILED: Verification failed\n- EXPIRED: Verification link expired\n- CANCELLED: Verification was cancelled"
										},
										"reference": {
											"description": "Your own reference for the check.",
											"type": [
												"string",
												"null"
											]
										},
										"language": {
											"description": "ISO 639-1 language code, such as `sv` or `en`. `GET /api/v1/helpers/languages` lists them.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it",
												null
											]
										},
										"expiresAt": {
											"description": "When the identity check and its link expire.",
											"type": "string",
											"format": "date-time"
										},
										"verifiedAt": {
											"description": "When the person was verified. Null until then.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the identity check was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the identity check was last updated."
										},
										"verificationUrl": {
											"description": "The verification link. Set only in the response to the create request; null otherwise.",
											"type": [
												"string",
												"null"
											]
										},
										"contact": {
											"description": "The contact the check is linked to.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The contact ID."
												},
												"firstName": {
													"type": "string"
												},
												"lastName": {
													"type": "string"
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												},
												"phone": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"firstName",
												"lastName",
												"email",
												"phone"
											],
											"additionalProperties": false
										},
										"createdBy": {
											"description": "A sajn user",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false
										},
										"audits": {
											"description": "What happened to the check, newest first. Null in lists and in the response to the create request.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Audit log entry ID"
													},
													"type": {
														"type": "string",
														"description": "Event type (e.g., ID_CREATED, ID_SENT, ID_VERIFIED)"
													},
													"createdAt": {
														"description": "When this event occurred",
														"type": "string",
														"format": "date-time"
													},
													"data": {
														"type": "object",
														"additionalProperties": {},
														"description": "Event-specific data"
													},
													"name": {
														"description": "Name of person who triggered this event",
														"type": [
															"string",
															"null"
														]
													},
													"email": {
														"description": "Email of person who triggered this event",
														"type": [
															"string",
															"null"
														]
													},
													"ipAddress": {
														"description": "IP address of request",
														"type": [
															"string",
															"null"
														]
													},
													"userAgent": {
														"description": "User agent of request",
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"id",
													"type",
													"createdAt",
													"data",
													"name",
													"email",
													"ipAddress",
													"userAgent"
												],
												"additionalProperties": false
											}
										},
										"data": {
											"description": "Verification data, such as the BankID result. Null in lists and in the response to the create request.",
											"type": [
												"object",
												"null"
											],
											"additionalProperties": {}
										}
									},
									"required": [
										"id",
										"organizationId",
										"fullName",
										"email",
										"phone",
										"channel",
										"status",
										"reference",
										"language",
										"expiresAt",
										"verifiedAt",
										"createdAt",
										"updatedAt",
										"verificationUrl",
										"contact",
										"createdBy",
										"audits",
										"data"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10025abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"fullName": "Kai Lindqvist",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"channel": "EMAIL",
									"status": "VERIFIED",
									"reference": "HR-2026-0142",
									"language": "sv",
									"expiresAt": "2026-10-28T22:00:00.000Z",
									"verifiedAt": "2026-09-29T07:41:00.000Z",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"verificationUrl": "https://app.sajn.se/id/cm4k2x9p10025abcd1234efgh",
									"contact": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"email": "kai@example.com",
										"phone": "+46701740605"
									},
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"audits": [
										{
											"id": "cm4k2x9p10038abcd1234efgh",
											"type": "VERIFICATION_COMPLETED",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"data": {
												"partyId": "cm4k2x9p10004abcd1234efgh",
												"signatureType": "SE_BANKID"
											},
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"ipAddress": "192.0.2.10",
											"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15"
										}
									],
									"data": {
										"partyId": "cm4k2x9p10004abcd1234efgh",
										"signatureType": "SE_BANKID"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires sajnid:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"sajnid:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Identity check not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "sajn_id"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"sajnid:read"
						]
					}
				]
			}
		},
		"/api/v1/files/{id}": {
			"get": {
				"description": "Retrieve file information and access URL.\n\n**URL Generation:**\n- For `PRIVATE` files: Returns a fresh signed URL (valid for 15 minutes)\n- For `PUBLIC` files: Returns the permanent CloudFront URL\n\n**Response includes:**\n- File metadata (filename, size, MIME type)\n- Visibility setting\n- Access URL\n- Upload information",
				"summary": "Get file by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The file ID.",
						"example": "cm4k2x9p10012abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFile",
				"responses": {
					"200": {
						"description": "File information with access URL",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique file identifier"
										},
										"filename": {
											"type": "string",
											"description": "Original filename"
										},
										"mimeType": {
											"type": "string",
											"description": "MIME type of the file"
										},
										"size": {
											"type": "number",
											"description": "File size in bytes"
										},
										"visibility": {
											"type": "string",
											"enum": [
												"PRIVATE",
												"PUBLIC"
											],
											"description": "File visibility"
										},
										"url": {
											"type": "string",
											"format": "uri",
											"description": "URL to access the file (signed URL for private, direct URL for public)"
										},
										"createdAt": {
											"description": "Date and time when file was uploaded",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when file was last updated",
											"type": "string",
											"format": "date-time"
										},
										"uploadedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who uploaded the file"
										}
									},
									"required": [
										"id",
										"filename",
										"mimeType",
										"size",
										"visibility",
										"url",
										"createdAt",
										"updatedAt",
										"uploadedBy"
									],
									"additionalProperties": false,
									"description": "File information with access URL"
								},
								"example": {
									"id": "cm4k2x9p10012abcd1234efgh",
									"filename": "anstallningsavtal-kai-lindqvist.pdf",
									"mimeType": "application/pdf",
									"size": 184320,
									"visibility": "PRIVATE",
									"url": "https://files.sajn.se/files/anstallningsavtal-kai-lindqvist.pdf",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"uploadedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "File not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "file"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"delete": {
				"description": "Delete a file from storage and database.\n\n**Warning:** This operation is irreversible. The file is permanently deleted from both storage and the database.\n\n**Response:** Returns `{ id, deleted: true }`.",
				"summary": "Delete a file",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The file ID.",
						"example": "cm4k2x9p10012abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteFile",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted file"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the file is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10012abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "File not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "file"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:delete"
						]
					}
				]
			}
		},
		"/api/v1/files": {
			"post": {
				"description": "Create a file record and get a presigned URL to upload the bytes **directly to storage**.\n\n**Flow:**\n1. Compute the file's SHA-256 hash and base64-encode it.\n2. Call this endpoint with the filename, MIME type, size, and checksum. You receive the file object and a presigned `uploadUrl`.\n3. `PUT` the raw bytes to `uploadUrl` with headers `Content-Type: <mimeType>` and `x-amz-checksum-sha256: <checksum>`. S3 verifies the checksum on write.\n4. (Recommended) Call `POST /api/v1/files/:id/confirm` to verify the upload and flip the record to `CONFIRMED` immediately. Otherwise it is confirmed automatically the first time it is fetched via `GET /api/v1/files/:id`.\n\n**Why:** the bytes go straight to storage, so there is no API-server size limit.",
				"summary": "Create a file (presigned upload)",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createFile",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"fileName": {
										"type": "string",
										"minLength": 1,
										"maxLength": 255,
										"description": "Original filename including its extension"
									},
									"mimeType": {
										"type": "string",
										"enum": [
											"application/pdf",
											"application/msword",
											"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
											"application/vnd.ms-excel",
											"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
											"application/vnd.ms-powerpoint",
											"application/vnd.openxmlformats-officedocument.presentationml.presentation",
											"video/mp4",
											"video/quicktime",
											"video/x-msvideo",
											"video/webm",
											"image/jpeg",
											"image/png",
											"image/gif",
											"image/webp",
											"image/svg+xml"
										],
										"description": "MIME type of the file"
									},
									"size": {
										"type": "integer",
										"exclusiveMinimum": 0,
										"maximum": 26214400,
										"description": "File size in bytes (max 25 MB)"
									},
									"checksum": {
										"type": "string",
										"minLength": 1,
										"description": "Base64-encoded SHA-256 checksum of the file. S3 enforces it on upload, so a mismatch rejects the bytes."
									},
									"visibility": {
										"default": "PRIVATE",
										"description": "File visibility (default PRIVATE)",
										"type": "string",
										"enum": [
											"PRIVATE",
											"PUBLIC"
										]
									}
								},
								"required": [
									"fileName",
									"mimeType",
									"size",
									"checksum"
								],
								"description": "Request a presigned upload URL and create a pending file record"
							},
							"example": {
								"fileName": "anstallningsavtal-kai-lindqvist.pdf",
								"mimeType": "application/pdf",
								"size": 184320,
								"checksum": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=",
								"visibility": "PRIVATE"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "The created file and the URL to upload its bytes to",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique file identifier"
										},
										"filename": {
											"type": "string",
											"description": "Original filename"
										},
										"mimeType": {
											"type": "string",
											"description": "MIME type of the file"
										},
										"size": {
											"type": "number",
											"description": "File size in bytes"
										},
										"visibility": {
											"type": "string",
											"enum": [
												"PRIVATE",
												"PUBLIC"
											],
											"description": "File visibility"
										},
										"url": {
											"type": "string",
											"format": "uri",
											"description": "URL to access the file (signed URL for private, direct URL for public)"
										},
										"createdAt": {
											"description": "Date and time when file was uploaded",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when file was last updated",
											"type": "string",
											"format": "date-time"
										},
										"uploadedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who uploaded the file"
										},
										"key": {
											"type": "string",
											"description": "The storage key of the file. Set it as a PDF field's `fieldMeta.value` to render the file."
										},
										"uploadUrl": {
											"type": "string",
											"format": "uri",
											"description": "Presigned PUT URL (valid 15 minutes). Upload the bytes here with headers Content-Type: <mimeType> and x-amz-checksum-sha256: <checksum>."
										}
									},
									"required": [
										"id",
										"filename",
										"mimeType",
										"size",
										"visibility",
										"url",
										"createdAt",
										"updatedAt",
										"uploadedBy",
										"key",
										"uploadUrl"
									],
									"additionalProperties": false,
									"description": "The created file and the URL to upload its bytes to"
								},
								"example": {
									"id": "cm4k2x9p10012abcd1234efgh",
									"filename": "anstallningsavtal-kai-lindqvist.pdf",
									"mimeType": "application/pdf",
									"size": 184320,
									"visibility": "PRIVATE",
									"url": "https://files.sajn.se/files/anstallningsavtal-kai-lindqvist.pdf",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"uploadedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"key": "f/cm4k2x9p10000abcd1234efgh/cm4k2x9p10012abcd1234efgh/anstallningsavtal-kai-lindqvist.pdf",
									"uploadUrl": "https://files.sajn.se/uploads/anstallningsavtal-kai-lindqvist.pdf?X-Amz-Expires=3600"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "fileName",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"get": {
				"description": "Retrieve a paginated list of files in your organization.\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.\n\n**Filtering:** Optionally filter by visibility (PRIVATE or PUBLIC).\n\n**Response:**\n- Files are sorted by creation date (newest first)\n- Use the 'getFile' endpoint to retrieve file access URLs",
				"summary": "List files",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "visibility",
						"in": "query",
						"description": "Filter by visibility",
						"schema": {
							"type": "string",
							"enum": [
								"PRIVATE",
								"PUBLIC"
							]
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only files created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only files created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only files updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only files updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFiles",
				"responses": {
					"200": {
						"description": "Paginated list of files",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique file identifier"
													},
													"filename": {
														"type": "string",
														"description": "Original filename"
													},
													"mimeType": {
														"type": "string",
														"description": "MIME type of the file"
													},
													"size": {
														"type": "number",
														"description": "File size in bytes"
													},
													"visibility": {
														"type": "string",
														"enum": [
															"PRIVATE",
															"PUBLIC"
														],
														"description": "File visibility"
													},
													"createdAt": {
														"description": "Date and time when file was uploaded",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when file was last updated",
														"type": "string",
														"format": "date-time"
													},
													"uploadedBy": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The user who uploaded the file"
													}
												},
												"required": [
													"id",
													"filename",
													"mimeType",
													"size",
													"visibility",
													"createdAt",
													"updatedAt",
													"uploadedBy"
												],
												"additionalProperties": false,
												"description": "File information without access URL"
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Paginated list of files"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10012abcd1234efgh",
											"filename": "anstallningsavtal-kai-lindqvist.pdf",
											"mimeType": "application/pdf",
											"size": 184320,
											"visibility": "PRIVATE",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"uploadedBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											}
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/files/{id}/confirm": {
			"post": {
				"description": "Confirm a previously-created file after its bytes have been uploaded to the presigned URL.\n\nThe server reads the persisted object back from storage (`HeadObject`), verifies the size and — when the backend records it — that the SHA-256 matches the checksum supplied at create time, then flips the file from `PENDING` to `CONFIRMED`.\n\n**When to call:** right after the upload `PUT` returns `200`. It is optional but recommended — a file is otherwise confirmed lazily the first time it is fetched via `GET /api/v1/files/:id`. Idempotent: confirming an already-confirmed file returns it unchanged.\n\n**Response:** Returns the file in the shape of `GET /api/v1/files/:id`.",
				"summary": "Confirm an uploaded file",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The file ID.",
						"example": "cm4k2x9p10012abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "confirmFile",
				"responses": {
					"200": {
						"description": "File information with access URL",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique file identifier"
										},
										"filename": {
											"type": "string",
											"description": "Original filename"
										},
										"mimeType": {
											"type": "string",
											"description": "MIME type of the file"
										},
										"size": {
											"type": "number",
											"description": "File size in bytes"
										},
										"visibility": {
											"type": "string",
											"enum": [
												"PRIVATE",
												"PUBLIC"
											],
											"description": "File visibility"
										},
										"url": {
											"type": "string",
											"format": "uri",
											"description": "URL to access the file (signed URL for private, direct URL for public)"
										},
										"createdAt": {
											"description": "Date and time when file was uploaded",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when file was last updated",
											"type": "string",
											"format": "date-time"
										},
										"uploadedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who uploaded the file"
										}
									},
									"required": [
										"id",
										"filename",
										"mimeType",
										"size",
										"visibility",
										"url",
										"createdAt",
										"updatedAt",
										"uploadedBy"
									],
									"additionalProperties": false,
									"description": "File information with access URL"
								},
								"example": {
									"id": "cm4k2x9p10012abcd1234efgh",
									"filename": "anstallningsavtal-kai-lindqvist.pdf",
									"mimeType": "application/pdf",
									"size": 184320,
									"visibility": "PRIVATE",
									"url": "https://files.sajn.se/files/anstallningsavtal-kai-lindqvist.pdf",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"uploadedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "File not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "file"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/webhooks": {
			"get": {
				"description": "Retrieve a paginated list of all webhooks in your organization.\n\nWebhooks allow you to receive real-time notifications when events occur in your workspace (e.g., document signed, contact created).\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.",
				"summary": "List all webhooks",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only webhooks created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only webhooks created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only webhooks updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only webhooks updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getWebhooks",
				"responses": {
					"200": {
						"description": "Paginated list of webhooks",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique webhook identifier"
													},
													"url": {
														"type": "string",
														"description": "URL that receives webhook events"
													},
													"secret": {
														"description": "Signing secret for this endpoint, in the Standard Webhooks format `whsec_<base64>`. Returned only when you create the webhook and when you rotate the secret, so store it then.",
														"type": "string"
													},
													"enabled": {
														"type": "boolean",
														"description": "Whether this webhook is active"
													},
													"status": {
														"type": "string",
														"enum": [
															"ENABLED",
															"DISABLED",
															"PAUSED"
														],
														"description": "`DISABLED` when `enabled` is false. `PAUSED` when sajn stopped delivering because the endpoint failed for three days or answered `410 Gone`; resume with `POST /api/v1/webhooks/:id/reactivate`."
													},
													"pausedAt": {
														"description": "When sajn paused the webhook. Null unless `status` is `PAUSED`.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"pauseReason": {
														"description": "Why sajn paused the webhook: `HTTP_<status code>` for the last answer, such as `HTTP_410`, or `NETWORK_ERROR`. Null unless `status` is `PAUSED`.",
														"type": [
															"string",
															"null"
														]
													},
													"failureNotificationEmail": {
														"description": "Email address that receives a notification if webhook delivery fails",
														"type": [
															"string",
															"null"
														]
													},
													"events": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"document.created",
																"document.sent",
																"document.fully_signed",
																"document.completed",
																"document.rejected",
																"document.expired",
																"document.withdrawn",
																"document.updated",
																"document.deleted",
																"document.restored",
																"document.archived",
																"document.unarchived",
																"document.expiration_extended",
																"document.expiring_soon",
																"document.party.sent",
																"document.party.delivery_failed",
																"document.party.opened",
																"document.party.read",
																"document.party.signed",
																"document.party.rejected",
																"document.party.delegated",
																"document.party.auth_failed",
																"document.party.verified",
																"document.party.updated",
																"document.party.added",
																"document.party.removed",
																"document.party.reminded",
																"document.comment.created",
																"bundle.sent",
																"bundle.party.signed",
																"bundle.completed",
																"bundle.cancelled",
																"archive_import.completed",
																"archive_import.undone",
																"identity_check.created",
																"identity_check.sent",
																"identity_check.opened",
																"identity_check.verified",
																"identity_check.failed",
																"identity_check.cancelled",
																"contact.created",
																"contact.updated",
																"contact.deleted",
																"company.created",
																"company.updated",
																"company.deleted",
																"template.created",
																"template.updated",
																"template.deleted",
																"template.restored",
																"form.submitted",
																"workspace.created",
																"member.added",
																"member.invited",
																"member.invite_accepted",
																"approval_request.created",
																"approval_request.approved",
																"approval_request.rejected",
																"approval_request.cancelled",
																"login.completed",
																"login.failed",
																"security.document_downloaded",
																"security.documents_exported",
																"security.signature_identity_accessed",
																"security.member_removed",
																"security.member_role_changed",
																"security.role_updated",
																"security.workspace_retention_updated",
																"usage.limit_reached"
															]
														},
														"description": "The event types this webhook subscribes to"
													},
													"apiVersion": {
														"type": "string",
														"description": "API version, in YYYY-MM format, that determines the payload shape this endpoint receives"
													},
													"createdAt": {
														"description": "Date and time when webhook was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when webhook was last updated",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"url",
													"enabled",
													"status",
													"pausedAt",
													"pauseReason",
													"failureNotificationEmail",
													"events",
													"apiVersion",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"description": "Webhook response",
												"example": {
													"id": "cm4k2x9p10013abcd1234efgh",
													"url": "https://example.com/webhooks/sajn",
													"enabled": true,
													"status": "ENABLED",
													"pausedAt": null,
													"pauseReason": null,
													"failureNotificationEmail": "dev@example.com",
													"events": [
														"document.fully_signed",
														"document.completed"
													],
													"apiVersion": "2026-10",
													"createdAt": "2026-09-01T12:00:00.000Z",
													"updatedAt": "2026-09-01T12:00:00.000Z"
												}
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Paginated list of webhooks"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10013abcd1234efgh",
											"url": "https://example.com/webhooks/sajn",
											"enabled": true,
											"status": "ENABLED",
											"pausedAt": null,
											"pauseReason": null,
											"failureNotificationEmail": "dev@example.com",
											"events": [
												"document.fully_signed",
												"document.completed"
											],
											"apiVersion": "2026-10",
											"createdAt": "2026-09-01T12:00:00.000Z",
											"updatedAt": "2026-09-01T12:00:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new webhook subscription for your workspace.\n\n**Required Fields:**\n- `url` - URL that receives a POST request for each event\n- `events` - The event types to subscribe to, such as `document.completed`\n\n**Optional Fields:**\n- `secret` - Signing secret in the Standard Webhooks format, `whsec_<base64>`. sajn generates one when omitted, and the response returns it once\n- `enabled` - Whether the webhook is active (default: true)\n- `apiVersion` - API version, such as `2026-10`, that determines the body this endpoint receives. Defaults to the API version of this request. The endpoint keeps this version until you change it with `PATCH /api/v1/webhooks/:id`\n\n**Delivery:** each event is a POST with the body `{ id, type, createdAt, apiVersion, workspaceId, environment, actor, data }`, the same object `GET /api/v1/events/:id` returns. `data.object` is the resource the event is about. The request follows [Standard Webhooks](https://www.standardwebhooks.com): `webhook-id` is the event `id`, `webhook-timestamp` is the send time in Unix seconds, and `webhook-signature` is `v1,<base64 HMAC-SHA256>` over `<webhook-id>.<webhook-timestamp>.<raw body>`, keyed with the base64-decoded secret after `whsec_`. Any Standard Webhooks library verifies it. Return a 2xx status code within 30 seconds. sajn retries any other answer, a timeout, and a network error with backoff for about three days, and stops at once on `410 Gone`. Delivery is at least once, so deduplicate on `webhook-id`.\n\n**Event types:** `events` takes the following values:\n- Document, with the document in `data.object`: `document.created` (with `data.source`), `document.sent`, `document.fully_signed`, `document.completed`, `document.rejected`, `document.expired`, `document.withdrawn`, `document.updated`, `document.deleted`, `document.restored`, `document.archived`, `document.unarchived`, `document.expiration_extended`, `document.expiring_soon`, and `document.comment.created`, with the comment in `data.object`\n- Party, with the document in `data.object` and the party in `data.party`: `document.party.sent`, `document.party.delivery_failed`, `document.party.opened`, `document.party.read`, `document.party.signed`, `document.party.rejected`, `document.party.delegated`, `document.party.auth_failed`, `document.party.verified`, `document.party.updated`, `document.party.added`, `document.party.removed`, `document.party.reminded`\n- Bundle, with the bundle in `data.object`: `bundle.sent`, `bundle.party.signed`, `bundle.completed`, `bundle.cancelled`\n- Archive import, with the import in `data.object`: `archive_import.completed`, once per run, and `archive_import.undone`\n- Approval: `approval_request.created`, `approval_request.approved`, `approval_request.rejected`, `approval_request.cancelled`\n- Identity check: `identity_check.created`, `identity_check.sent`, `identity_check.opened`, `identity_check.verified`, `identity_check.failed`, `identity_check.cancelled`\n- Contact, company and template: `contact.created`, `contact.updated`, `contact.deleted`, `company.created`, `company.updated`, `company.deleted`, `template.created`, `template.updated`, `template.deleted`, `template.restored`\n- Form: `form.submitted`, with the same fields as `GET /api/v1/forms/:id/submissions/:submissionId`\n- Workspace: `workspace.created`, `member.added`, `member.invited`, `member.invite_accepted`\n- sajn Login: `login.completed`, `login.failed`, with the login session in `data.object`\n- Security, a feed for a SIEM: `security.document_downloaded`, `security.documents_exported`, `security.signature_identity_accessed`, `security.member_removed`, `security.member_role_changed`, `security.role_updated`, `security.workspace_retention_updated`\n- Usage: `usage.limit_reached`\n\n**Plan Requirement:** Requires the Team plan or higher, or a sandbox organization.",
				"summary": "Create a new webhook",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createWebhook",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"url": {
										"type": "string",
										"format": "uri",
										"description": "URL that will receive webhook events"
									},
									"events": {
										"minItems": 1,
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"document.created",
												"document.sent",
												"document.fully_signed",
												"document.completed",
												"document.rejected",
												"document.expired",
												"document.withdrawn",
												"document.updated",
												"document.deleted",
												"document.restored",
												"document.archived",
												"document.unarchived",
												"document.expiration_extended",
												"document.expiring_soon",
												"document.party.sent",
												"document.party.delivery_failed",
												"document.party.opened",
												"document.party.read",
												"document.party.signed",
												"document.party.rejected",
												"document.party.delegated",
												"document.party.auth_failed",
												"document.party.verified",
												"document.party.updated",
												"document.party.added",
												"document.party.removed",
												"document.party.reminded",
												"document.comment.created",
												"bundle.sent",
												"bundle.party.signed",
												"bundle.completed",
												"bundle.cancelled",
												"archive_import.completed",
												"archive_import.undone",
												"identity_check.created",
												"identity_check.sent",
												"identity_check.opened",
												"identity_check.verified",
												"identity_check.failed",
												"identity_check.cancelled",
												"contact.created",
												"contact.updated",
												"contact.deleted",
												"company.created",
												"company.updated",
												"company.deleted",
												"template.created",
												"template.updated",
												"template.deleted",
												"template.restored",
												"form.submitted",
												"workspace.created",
												"member.added",
												"member.invited",
												"member.invite_accepted",
												"approval_request.created",
												"approval_request.approved",
												"approval_request.rejected",
												"approval_request.cancelled",
												"login.completed",
												"login.failed",
												"security.document_downloaded",
												"security.documents_exported",
												"security.signature_identity_accessed",
												"security.member_removed",
												"security.member_role_changed",
												"security.role_updated",
												"security.workspace_retention_updated",
												"usage.limit_reached"
											]
										},
										"description": "The event types to subscribe to, such as `document.completed`"
									},
									"secret": {
										"description": "Signing secret for this endpoint, in the Standard Webhooks format: `whsec_` followed by the base64 of 24 to 64 random bytes. Omit it to have sajn generate one",
										"type": [
											"string",
											"null"
										]
									},
									"enabled": {
										"default": true,
										"description": "Whether this webhook is active (default: true)",
										"type": "boolean"
									},
									"failureNotificationEmail": {
										"description": "Email address that will be notified if webhook delivery fails",
										"type": [
											"string",
											"null"
										],
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"apiVersion": {
										"description": "API version that determines the payload shape this endpoint receives. Defaults to your organization's API version",
										"type": "string",
										"enum": [
											"2026-09",
											"2026-10"
										]
									}
								},
								"required": [
									"url",
									"events"
								],
								"description": "Create webhook request"
							},
							"example": {
								"url": "https://example.com/webhooks/sajn",
								"events": [
									"document.fully_signed",
									"document.completed"
								],
								"failureNotificationEmail": "dev@example.com",
								"apiVersion": "2026-10"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Webhook response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique webhook identifier"
										},
										"url": {
											"type": "string",
											"description": "URL that receives webhook events"
										},
										"secret": {
											"description": "Signing secret for this endpoint, in the Standard Webhooks format `whsec_<base64>`. Returned only when you create the webhook and when you rotate the secret, so store it then.",
											"type": "string"
										},
										"enabled": {
											"type": "boolean",
											"description": "Whether this webhook is active"
										},
										"status": {
											"type": "string",
											"enum": [
												"ENABLED",
												"DISABLED",
												"PAUSED"
											],
											"description": "`DISABLED` when `enabled` is false. `PAUSED` when sajn stopped delivering because the endpoint failed for three days or answered `410 Gone`; resume with `POST /api/v1/webhooks/:id/reactivate`."
										},
										"pausedAt": {
											"description": "When sajn paused the webhook. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"pauseReason": {
											"description": "Why sajn paused the webhook: `HTTP_<status code>` for the last answer, such as `HTTP_410`, or `NETWORK_ERROR`. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											]
										},
										"failureNotificationEmail": {
											"description": "Email address that receives a notification if webhook delivery fails",
											"type": [
												"string",
												"null"
											]
										},
										"events": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"document.created",
													"document.sent",
													"document.fully_signed",
													"document.completed",
													"document.rejected",
													"document.expired",
													"document.withdrawn",
													"document.updated",
													"document.deleted",
													"document.restored",
													"document.archived",
													"document.unarchived",
													"document.expiration_extended",
													"document.expiring_soon",
													"document.party.sent",
													"document.party.delivery_failed",
													"document.party.opened",
													"document.party.read",
													"document.party.signed",
													"document.party.rejected",
													"document.party.delegated",
													"document.party.auth_failed",
													"document.party.verified",
													"document.party.updated",
													"document.party.added",
													"document.party.removed",
													"document.party.reminded",
													"document.comment.created",
													"bundle.sent",
													"bundle.party.signed",
													"bundle.completed",
													"bundle.cancelled",
													"archive_import.completed",
													"archive_import.undone",
													"identity_check.created",
													"identity_check.sent",
													"identity_check.opened",
													"identity_check.verified",
													"identity_check.failed",
													"identity_check.cancelled",
													"contact.created",
													"contact.updated",
													"contact.deleted",
													"company.created",
													"company.updated",
													"company.deleted",
													"template.created",
													"template.updated",
													"template.deleted",
													"template.restored",
													"form.submitted",
													"workspace.created",
													"member.added",
													"member.invited",
													"member.invite_accepted",
													"approval_request.created",
													"approval_request.approved",
													"approval_request.rejected",
													"approval_request.cancelled",
													"login.completed",
													"login.failed",
													"security.document_downloaded",
													"security.documents_exported",
													"security.signature_identity_accessed",
													"security.member_removed",
													"security.member_role_changed",
													"security.role_updated",
													"security.workspace_retention_updated",
													"usage.limit_reached"
												]
											},
											"description": "The event types this webhook subscribes to"
										},
										"apiVersion": {
											"type": "string",
											"description": "API version, in YYYY-MM format, that determines the payload shape this endpoint receives"
										},
										"createdAt": {
											"description": "Date and time when webhook was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when webhook was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"url",
										"enabled",
										"status",
										"pausedAt",
										"pauseReason",
										"failureNotificationEmail",
										"events",
										"apiVersion",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Webhook response",
									"example": {
										"id": "cm4k2x9p10013abcd1234efgh",
										"url": "https://example.com/webhooks/sajn",
										"enabled": true,
										"status": "ENABLED",
										"pausedAt": null,
										"pauseReason": null,
										"failureNotificationEmail": "dev@example.com",
										"events": [
											"document.fully_signed",
											"document.completed"
										],
										"apiVersion": "2026-10",
										"createdAt": "2026-09-01T12:00:00.000Z",
										"updatedAt": "2026-09-01T12:00:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10013abcd1234efgh",
									"url": "https://example.com/webhooks/sajn",
									"enabled": true,
									"status": "ENABLED",
									"pausedAt": null,
									"pauseReason": null,
									"failureNotificationEmail": "dev@example.com",
									"events": [
										"document.fully_signed",
										"document.completed"
									],
									"apiVersion": "2026-10",
									"createdAt": "2026-09-01T12:00:00.000Z",
									"updatedAt": "2026-09-01T12:00:00.000Z",
									"secret": "whsec_c2Fqbi1leGFtcGxlLXdlYmhvb2stc2VjcmV0LTAwNDI="
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "url",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:write"
						]
					}
				]
			}
		},
		"/api/v1/webhooks/{id}": {
			"get": {
				"description": "Retrieve detailed information about a specific webhook including the event types it subscribes to. The response leaves out `secret`, which only creating the webhook and rotating its secret return.",
				"summary": "Get a webhook by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getWebhook",
				"responses": {
					"200": {
						"description": "Webhook response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique webhook identifier"
										},
										"url": {
											"type": "string",
											"description": "URL that receives webhook events"
										},
										"secret": {
											"description": "Signing secret for this endpoint, in the Standard Webhooks format `whsec_<base64>`. Returned only when you create the webhook and when you rotate the secret, so store it then.",
											"type": "string"
										},
										"enabled": {
											"type": "boolean",
											"description": "Whether this webhook is active"
										},
										"status": {
											"type": "string",
											"enum": [
												"ENABLED",
												"DISABLED",
												"PAUSED"
											],
											"description": "`DISABLED` when `enabled` is false. `PAUSED` when sajn stopped delivering because the endpoint failed for three days or answered `410 Gone`; resume with `POST /api/v1/webhooks/:id/reactivate`."
										},
										"pausedAt": {
											"description": "When sajn paused the webhook. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"pauseReason": {
											"description": "Why sajn paused the webhook: `HTTP_<status code>` for the last answer, such as `HTTP_410`, or `NETWORK_ERROR`. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											]
										},
										"failureNotificationEmail": {
											"description": "Email address that receives a notification if webhook delivery fails",
											"type": [
												"string",
												"null"
											]
										},
										"events": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"document.created",
													"document.sent",
													"document.fully_signed",
													"document.completed",
													"document.rejected",
													"document.expired",
													"document.withdrawn",
													"document.updated",
													"document.deleted",
													"document.restored",
													"document.archived",
													"document.unarchived",
													"document.expiration_extended",
													"document.expiring_soon",
													"document.party.sent",
													"document.party.delivery_failed",
													"document.party.opened",
													"document.party.read",
													"document.party.signed",
													"document.party.rejected",
													"document.party.delegated",
													"document.party.auth_failed",
													"document.party.verified",
													"document.party.updated",
													"document.party.added",
													"document.party.removed",
													"document.party.reminded",
													"document.comment.created",
													"bundle.sent",
													"bundle.party.signed",
													"bundle.completed",
													"bundle.cancelled",
													"archive_import.completed",
													"archive_import.undone",
													"identity_check.created",
													"identity_check.sent",
													"identity_check.opened",
													"identity_check.verified",
													"identity_check.failed",
													"identity_check.cancelled",
													"contact.created",
													"contact.updated",
													"contact.deleted",
													"company.created",
													"company.updated",
													"company.deleted",
													"template.created",
													"template.updated",
													"template.deleted",
													"template.restored",
													"form.submitted",
													"workspace.created",
													"member.added",
													"member.invited",
													"member.invite_accepted",
													"approval_request.created",
													"approval_request.approved",
													"approval_request.rejected",
													"approval_request.cancelled",
													"login.completed",
													"login.failed",
													"security.document_downloaded",
													"security.documents_exported",
													"security.signature_identity_accessed",
													"security.member_removed",
													"security.member_role_changed",
													"security.role_updated",
													"security.workspace_retention_updated",
													"usage.limit_reached"
												]
											},
											"description": "The event types this webhook subscribes to"
										},
										"apiVersion": {
											"type": "string",
											"description": "API version, in YYYY-MM format, that determines the payload shape this endpoint receives"
										},
										"createdAt": {
											"description": "Date and time when webhook was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when webhook was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"url",
										"enabled",
										"status",
										"pausedAt",
										"pauseReason",
										"failureNotificationEmail",
										"events",
										"apiVersion",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Webhook response",
									"example": {
										"id": "cm4k2x9p10013abcd1234efgh",
										"url": "https://example.com/webhooks/sajn",
										"enabled": true,
										"status": "ENABLED",
										"pausedAt": null,
										"pauseReason": null,
										"failureNotificationEmail": "dev@example.com",
										"events": [
											"document.fully_signed",
											"document.completed"
										],
										"apiVersion": "2026-10",
										"createdAt": "2026-09-01T12:00:00.000Z",
										"updatedAt": "2026-09-01T12:00:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10013abcd1234efgh",
									"url": "https://example.com/webhooks/sajn",
									"enabled": true,
									"status": "ENABLED",
									"pausedAt": null,
									"pauseReason": null,
									"failureNotificationEmail": "dev@example.com",
									"events": [
										"document.fully_signed",
										"document.completed"
									],
									"apiVersion": "2026-10",
									"createdAt": "2026-09-01T12:00:00.000Z",
									"updatedAt": "2026-09-01T12:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "webhook"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:read"
						]
					}
				]
			},
			"patch": {
				"description": "Update webhook properties. Every field is optional, and an omitted field keeps its value.\n\nTo move the endpoint to a newer payload shape, set `apiVersion`. Every delivery after the change uses the new version, including retries of earlier events.\n\nTo replace the signing secret, use `POST /api/v1/webhooks/:id/rotate-secret`.\n\n**Plan Requirement:** Requires the Team plan or higher, or a sandbox organization.",
				"summary": "Update a webhook",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateWebhook",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"url": {
										"description": "URL that will receive webhook events",
										"type": "string",
										"format": "uri"
									},
									"events": {
										"description": "The event types to subscribe to. Replaces the current list",
										"minItems": 1,
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"document.created",
												"document.sent",
												"document.fully_signed",
												"document.completed",
												"document.rejected",
												"document.expired",
												"document.withdrawn",
												"document.updated",
												"document.deleted",
												"document.restored",
												"document.archived",
												"document.unarchived",
												"document.expiration_extended",
												"document.expiring_soon",
												"document.party.sent",
												"document.party.delivery_failed",
												"document.party.opened",
												"document.party.read",
												"document.party.signed",
												"document.party.rejected",
												"document.party.delegated",
												"document.party.auth_failed",
												"document.party.verified",
												"document.party.updated",
												"document.party.added",
												"document.party.removed",
												"document.party.reminded",
												"document.comment.created",
												"bundle.sent",
												"bundle.party.signed",
												"bundle.completed",
												"bundle.cancelled",
												"archive_import.completed",
												"archive_import.undone",
												"identity_check.created",
												"identity_check.sent",
												"identity_check.opened",
												"identity_check.verified",
												"identity_check.failed",
												"identity_check.cancelled",
												"contact.created",
												"contact.updated",
												"contact.deleted",
												"company.created",
												"company.updated",
												"company.deleted",
												"template.created",
												"template.updated",
												"template.deleted",
												"template.restored",
												"form.submitted",
												"workspace.created",
												"member.added",
												"member.invited",
												"member.invite_accepted",
												"approval_request.created",
												"approval_request.approved",
												"approval_request.rejected",
												"approval_request.cancelled",
												"login.completed",
												"login.failed",
												"security.document_downloaded",
												"security.documents_exported",
												"security.signature_identity_accessed",
												"security.member_removed",
												"security.member_role_changed",
												"security.role_updated",
												"security.workspace_retention_updated",
												"usage.limit_reached"
											]
										}
									},
									"enabled": {
										"description": "Whether this webhook is active",
										"type": "boolean"
									},
									"failureNotificationEmail": {
										"description": "Email address that will be notified if webhook delivery fails",
										"type": [
											"string",
											"null"
										],
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"apiVersion": {
										"description": "API version that determines the payload shape this endpoint receives. Set it to upgrade the endpoint to a newer payload shape",
										"type": "string",
										"enum": [
											"2026-09",
											"2026-10"
										]
									}
								},
								"description": "Update webhook request"
							},
							"example": {
								"events": [
									"document.fully_signed",
									"document.completed",
									"document.rejected"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Webhook response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique webhook identifier"
										},
										"url": {
											"type": "string",
											"description": "URL that receives webhook events"
										},
										"secret": {
											"description": "Signing secret for this endpoint, in the Standard Webhooks format `whsec_<base64>`. Returned only when you create the webhook and when you rotate the secret, so store it then.",
											"type": "string"
										},
										"enabled": {
											"type": "boolean",
											"description": "Whether this webhook is active"
										},
										"status": {
											"type": "string",
											"enum": [
												"ENABLED",
												"DISABLED",
												"PAUSED"
											],
											"description": "`DISABLED` when `enabled` is false. `PAUSED` when sajn stopped delivering because the endpoint failed for three days or answered `410 Gone`; resume with `POST /api/v1/webhooks/:id/reactivate`."
										},
										"pausedAt": {
											"description": "When sajn paused the webhook. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"pauseReason": {
											"description": "Why sajn paused the webhook: `HTTP_<status code>` for the last answer, such as `HTTP_410`, or `NETWORK_ERROR`. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											]
										},
										"failureNotificationEmail": {
											"description": "Email address that receives a notification if webhook delivery fails",
											"type": [
												"string",
												"null"
											]
										},
										"events": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"document.created",
													"document.sent",
													"document.fully_signed",
													"document.completed",
													"document.rejected",
													"document.expired",
													"document.withdrawn",
													"document.updated",
													"document.deleted",
													"document.restored",
													"document.archived",
													"document.unarchived",
													"document.expiration_extended",
													"document.expiring_soon",
													"document.party.sent",
													"document.party.delivery_failed",
													"document.party.opened",
													"document.party.read",
													"document.party.signed",
													"document.party.rejected",
													"document.party.delegated",
													"document.party.auth_failed",
													"document.party.verified",
													"document.party.updated",
													"document.party.added",
													"document.party.removed",
													"document.party.reminded",
													"document.comment.created",
													"bundle.sent",
													"bundle.party.signed",
													"bundle.completed",
													"bundle.cancelled",
													"archive_import.completed",
													"archive_import.undone",
													"identity_check.created",
													"identity_check.sent",
													"identity_check.opened",
													"identity_check.verified",
													"identity_check.failed",
													"identity_check.cancelled",
													"contact.created",
													"contact.updated",
													"contact.deleted",
													"company.created",
													"company.updated",
													"company.deleted",
													"template.created",
													"template.updated",
													"template.deleted",
													"template.restored",
													"form.submitted",
													"workspace.created",
													"member.added",
													"member.invited",
													"member.invite_accepted",
													"approval_request.created",
													"approval_request.approved",
													"approval_request.rejected",
													"approval_request.cancelled",
													"login.completed",
													"login.failed",
													"security.document_downloaded",
													"security.documents_exported",
													"security.signature_identity_accessed",
													"security.member_removed",
													"security.member_role_changed",
													"security.role_updated",
													"security.workspace_retention_updated",
													"usage.limit_reached"
												]
											},
											"description": "The event types this webhook subscribes to"
										},
										"apiVersion": {
											"type": "string",
											"description": "API version, in YYYY-MM format, that determines the payload shape this endpoint receives"
										},
										"createdAt": {
											"description": "Date and time when webhook was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when webhook was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"url",
										"enabled",
										"status",
										"pausedAt",
										"pauseReason",
										"failureNotificationEmail",
										"events",
										"apiVersion",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Webhook response",
									"example": {
										"id": "cm4k2x9p10013abcd1234efgh",
										"url": "https://example.com/webhooks/sajn",
										"enabled": true,
										"status": "ENABLED",
										"pausedAt": null,
										"pauseReason": null,
										"failureNotificationEmail": "dev@example.com",
										"events": [
											"document.fully_signed",
											"document.completed"
										],
										"apiVersion": "2026-10",
										"createdAt": "2026-09-01T12:00:00.000Z",
										"updatedAt": "2026-09-01T12:00:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10013abcd1234efgh",
									"url": "https://example.com/webhooks/sajn",
									"enabled": true,
									"status": "ENABLED",
									"pausedAt": null,
									"pauseReason": null,
									"failureNotificationEmail": "dev@example.com",
									"events": [
										"document.fully_signed",
										"document.completed",
										"document.rejected"
									],
									"apiVersion": "2026-10",
									"createdAt": "2026-09-01T12:00:00.000Z",
									"updatedAt": "2026-09-01T12:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "url",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "webhook"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:write"
						]
					}
				]
			},
			"delete": {
				"description": "Deletes a webhook subscription, with its event subscriptions and delivery log.\n\n**Plan Requirement:** Requires the Team plan or higher, or a sandbox organization.",
				"summary": "Delete a webhook",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteWebhook",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted webhook"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the webhook is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10013abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "webhook"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:write"
						]
					}
				]
			}
		},
		"/api/v1/webhooks/{id}/rotate-secret": {
			"post": {
				"description": "Generates a new signing secret and returns the webhook with it in `secret`. Store it: no other response returns it.\n\nFor 24 hours, every delivery carries two signatures in `webhook-signature`, one per secret, so you can deploy the new secret without dropping deliveries. A Standard Webhooks library accepts a request when any signature matches. After 24 hours, only the new secret signs.\n\n**Plan Requirement:** Requires the Team plan or higher, or a sandbox organization.",
				"summary": "Rotate a webhook's signing secret",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "rotateWebhookSecret",
				"responses": {
					"200": {
						"description": "Webhook response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique webhook identifier"
										},
										"url": {
											"type": "string",
											"description": "URL that receives webhook events"
										},
										"secret": {
											"description": "Signing secret for this endpoint, in the Standard Webhooks format `whsec_<base64>`. Returned only when you create the webhook and when you rotate the secret, so store it then.",
											"type": "string"
										},
										"enabled": {
											"type": "boolean",
											"description": "Whether this webhook is active"
										},
										"status": {
											"type": "string",
											"enum": [
												"ENABLED",
												"DISABLED",
												"PAUSED"
											],
											"description": "`DISABLED` when `enabled` is false. `PAUSED` when sajn stopped delivering because the endpoint failed for three days or answered `410 Gone`; resume with `POST /api/v1/webhooks/:id/reactivate`."
										},
										"pausedAt": {
											"description": "When sajn paused the webhook. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"pauseReason": {
											"description": "Why sajn paused the webhook: `HTTP_<status code>` for the last answer, such as `HTTP_410`, or `NETWORK_ERROR`. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											]
										},
										"failureNotificationEmail": {
											"description": "Email address that receives a notification if webhook delivery fails",
											"type": [
												"string",
												"null"
											]
										},
										"events": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"document.created",
													"document.sent",
													"document.fully_signed",
													"document.completed",
													"document.rejected",
													"document.expired",
													"document.withdrawn",
													"document.updated",
													"document.deleted",
													"document.restored",
													"document.archived",
													"document.unarchived",
													"document.expiration_extended",
													"document.expiring_soon",
													"document.party.sent",
													"document.party.delivery_failed",
													"document.party.opened",
													"document.party.read",
													"document.party.signed",
													"document.party.rejected",
													"document.party.delegated",
													"document.party.auth_failed",
													"document.party.verified",
													"document.party.updated",
													"document.party.added",
													"document.party.removed",
													"document.party.reminded",
													"document.comment.created",
													"bundle.sent",
													"bundle.party.signed",
													"bundle.completed",
													"bundle.cancelled",
													"archive_import.completed",
													"archive_import.undone",
													"identity_check.created",
													"identity_check.sent",
													"identity_check.opened",
													"identity_check.verified",
													"identity_check.failed",
													"identity_check.cancelled",
													"contact.created",
													"contact.updated",
													"contact.deleted",
													"company.created",
													"company.updated",
													"company.deleted",
													"template.created",
													"template.updated",
													"template.deleted",
													"template.restored",
													"form.submitted",
													"workspace.created",
													"member.added",
													"member.invited",
													"member.invite_accepted",
													"approval_request.created",
													"approval_request.approved",
													"approval_request.rejected",
													"approval_request.cancelled",
													"login.completed",
													"login.failed",
													"security.document_downloaded",
													"security.documents_exported",
													"security.signature_identity_accessed",
													"security.member_removed",
													"security.member_role_changed",
													"security.role_updated",
													"security.workspace_retention_updated",
													"usage.limit_reached"
												]
											},
											"description": "The event types this webhook subscribes to"
										},
										"apiVersion": {
											"type": "string",
											"description": "API version, in YYYY-MM format, that determines the payload shape this endpoint receives"
										},
										"createdAt": {
											"description": "Date and time when webhook was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when webhook was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"url",
										"enabled",
										"status",
										"pausedAt",
										"pauseReason",
										"failureNotificationEmail",
										"events",
										"apiVersion",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Webhook response",
									"example": {
										"id": "cm4k2x9p10013abcd1234efgh",
										"url": "https://example.com/webhooks/sajn",
										"enabled": true,
										"status": "ENABLED",
										"pausedAt": null,
										"pauseReason": null,
										"failureNotificationEmail": "dev@example.com",
										"events": [
											"document.fully_signed",
											"document.completed"
										],
										"apiVersion": "2026-10",
										"createdAt": "2026-09-01T12:00:00.000Z",
										"updatedAt": "2026-09-01T12:00:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10013abcd1234efgh",
									"url": "https://example.com/webhooks/sajn",
									"enabled": true,
									"status": "ENABLED",
									"pausedAt": null,
									"pauseReason": null,
									"failureNotificationEmail": "dev@example.com",
									"events": [
										"document.fully_signed",
										"document.completed"
									],
									"apiVersion": "2026-10",
									"createdAt": "2026-09-01T12:00:00.000Z",
									"updatedAt": "2026-09-01T12:00:00.000Z",
									"secret": "whsec_c2Fqbi1leGFtcGxlLXdlYmhvb2stc2VjcmV0LTAwNDI="
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "webhook"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:write"
						]
					}
				]
			}
		},
		"/api/v1/webhooks/{id}/reactivate": {
			"post": {
				"description": "Resumes deliveries to a webhook that sajn paused, and returns the webhook with `status: ENABLED`. sajn pauses a webhook when every delivery attempt failed for three days, or when the endpoint answered `410 Gone`. Events from the pause are kept as failed deliveries; to send one, retry it with `POST /api/v1/webhooks/:id/deliveries/:deliveryId/retry`.\n\nReturns `409 INVALID_STATE` when the webhook isn't paused, or is disabled. To turn on a disabled webhook, set `enabled` with `PATCH /api/v1/webhooks/:id`.\n\n**Plan Requirement:** Requires the Team plan or higher, or a sandbox organization.",
				"summary": "Reactivate a paused webhook",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "reactivateWebhook",
				"responses": {
					"200": {
						"description": "Webhook response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique webhook identifier"
										},
										"url": {
											"type": "string",
											"description": "URL that receives webhook events"
										},
										"secret": {
											"description": "Signing secret for this endpoint, in the Standard Webhooks format `whsec_<base64>`. Returned only when you create the webhook and when you rotate the secret, so store it then.",
											"type": "string"
										},
										"enabled": {
											"type": "boolean",
											"description": "Whether this webhook is active"
										},
										"status": {
											"type": "string",
											"enum": [
												"ENABLED",
												"DISABLED",
												"PAUSED"
											],
											"description": "`DISABLED` when `enabled` is false. `PAUSED` when sajn stopped delivering because the endpoint failed for three days or answered `410 Gone`; resume with `POST /api/v1/webhooks/:id/reactivate`."
										},
										"pausedAt": {
											"description": "When sajn paused the webhook. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"pauseReason": {
											"description": "Why sajn paused the webhook: `HTTP_<status code>` for the last answer, such as `HTTP_410`, or `NETWORK_ERROR`. Null unless `status` is `PAUSED`.",
											"type": [
												"string",
												"null"
											]
										},
										"failureNotificationEmail": {
											"description": "Email address that receives a notification if webhook delivery fails",
											"type": [
												"string",
												"null"
											]
										},
										"events": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"document.created",
													"document.sent",
													"document.fully_signed",
													"document.completed",
													"document.rejected",
													"document.expired",
													"document.withdrawn",
													"document.updated",
													"document.deleted",
													"document.restored",
													"document.archived",
													"document.unarchived",
													"document.expiration_extended",
													"document.expiring_soon",
													"document.party.sent",
													"document.party.delivery_failed",
													"document.party.opened",
													"document.party.read",
													"document.party.signed",
													"document.party.rejected",
													"document.party.delegated",
													"document.party.auth_failed",
													"document.party.verified",
													"document.party.updated",
													"document.party.added",
													"document.party.removed",
													"document.party.reminded",
													"document.comment.created",
													"bundle.sent",
													"bundle.party.signed",
													"bundle.completed",
													"bundle.cancelled",
													"archive_import.completed",
													"archive_import.undone",
													"identity_check.created",
													"identity_check.sent",
													"identity_check.opened",
													"identity_check.verified",
													"identity_check.failed",
													"identity_check.cancelled",
													"contact.created",
													"contact.updated",
													"contact.deleted",
													"company.created",
													"company.updated",
													"company.deleted",
													"template.created",
													"template.updated",
													"template.deleted",
													"template.restored",
													"form.submitted",
													"workspace.created",
													"member.added",
													"member.invited",
													"member.invite_accepted",
													"approval_request.created",
													"approval_request.approved",
													"approval_request.rejected",
													"approval_request.cancelled",
													"login.completed",
													"login.failed",
													"security.document_downloaded",
													"security.documents_exported",
													"security.signature_identity_accessed",
													"security.member_removed",
													"security.member_role_changed",
													"security.role_updated",
													"security.workspace_retention_updated",
													"usage.limit_reached"
												]
											},
											"description": "The event types this webhook subscribes to"
										},
										"apiVersion": {
											"type": "string",
											"description": "API version, in YYYY-MM format, that determines the payload shape this endpoint receives"
										},
										"createdAt": {
											"description": "Date and time when webhook was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when webhook was last updated",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"url",
										"enabled",
										"status",
										"pausedAt",
										"pauseReason",
										"failureNotificationEmail",
										"events",
										"apiVersion",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Webhook response",
									"example": {
										"id": "cm4k2x9p10013abcd1234efgh",
										"url": "https://example.com/webhooks/sajn",
										"enabled": true,
										"status": "ENABLED",
										"pausedAt": null,
										"pauseReason": null,
										"failureNotificationEmail": "dev@example.com",
										"events": [
											"document.fully_signed",
											"document.completed"
										],
										"apiVersion": "2026-10",
										"createdAt": "2026-09-01T12:00:00.000Z",
										"updatedAt": "2026-09-01T12:00:00.000Z"
									}
								},
								"example": {
									"id": "cm4k2x9p10013abcd1234efgh",
									"url": "https://example.com/webhooks/sajn",
									"enabled": true,
									"status": "ENABLED",
									"pausedAt": null,
									"pauseReason": null,
									"failureNotificationEmail": "dev@example.com",
									"events": [
										"document.fully_signed",
										"document.completed"
									],
									"apiVersion": "2026-10",
									"createdAt": "2026-09-01T12:00:00.000Z",
									"updatedAt": "2026-09-01T12:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "webhook"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:write"
						]
					}
				]
			}
		},
		"/api/v1/webhooks/{id}/test": {
			"post": {
				"description": "Sends a `webhook.test` event to this webhook only, signed and delivered like any other event in the webhook's API version, and returns the delivery with `status: PENDING`. `data.object` is the webhook's `id` and `url`. Follow the delivery with `GET /api/v1/webhooks/:id/deliveries/:deliveryId`. The event isn't listed in `GET /api/v1/events`, and no other webhook receives it.\n\nReturns `409 INVALID_STATE` when the webhook is disabled or paused.\n\n**Plan Requirement:** Requires the Team plan or higher, or a sandbox organization.",
				"summary": "Send a test event to a webhook",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "testWebhook",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the delivery: one event sent to one endpoint, with every attempt to send it."
										},
										"webhookId": {
											"type": "string",
											"description": "The webhook ID."
										},
										"eventId": {
											"description": "ID of the event, as `GET /api/v1/events/:id` takes it. Null for a delivery made before sajn recorded it.",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"description": "The event type, such as `document.completed`. Null for an event type that 2026-10 no longer has.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"document.created",
												"document.sent",
												"document.fully_signed",
												"document.completed",
												"document.rejected",
												"document.expired",
												"document.withdrawn",
												"document.updated",
												"document.deleted",
												"document.restored",
												"document.archived",
												"document.unarchived",
												"document.expiration_extended",
												"document.expiring_soon",
												"document.party.sent",
												"document.party.delivery_failed",
												"document.party.opened",
												"document.party.read",
												"document.party.signed",
												"document.party.rejected",
												"document.party.delegated",
												"document.party.auth_failed",
												"document.party.verified",
												"document.party.updated",
												"document.party.added",
												"document.party.removed",
												"document.party.reminded",
												"document.comment.created",
												"bundle.sent",
												"bundle.party.signed",
												"bundle.completed",
												"bundle.cancelled",
												"archive_import.completed",
												"archive_import.undone",
												"identity_check.created",
												"identity_check.sent",
												"identity_check.opened",
												"identity_check.verified",
												"identity_check.failed",
												"identity_check.cancelled",
												"contact.created",
												"contact.updated",
												"contact.deleted",
												"company.created",
												"company.updated",
												"company.deleted",
												"template.created",
												"template.updated",
												"template.deleted",
												"template.restored",
												"form.submitted",
												"workspace.created",
												"member.added",
												"member.invited",
												"member.invite_accepted",
												"approval_request.created",
												"approval_request.approved",
												"approval_request.rejected",
												"approval_request.cancelled",
												"login.completed",
												"login.failed",
												"security.document_downloaded",
												"security.documents_exported",
												"security.signature_identity_accessed",
												"security.member_removed",
												"security.member_role_changed",
												"security.role_updated",
												"security.workspace_retention_updated",
												"usage.limit_reached",
												"webhook.test",
												null
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"SUCCESS",
												"FAILED",
												"PENDING"
											],
											"description": "`SUCCESS` when an attempt got a 2xx answer, `FAILED` when sajn stopped retrying, and `PENDING` while attempts remain."
										},
										"url": {
											"type": "string",
											"description": "The endpoint URL the delivery was sent to."
										},
										"replayOfId": {
											"description": "ID of the delivery this one replays. Null for an original delivery.",
											"type": [
												"string",
												"null"
											]
										},
										"requestBody": {
											"type": "object",
											"description": "The JSON body sent to the endpoint, in the webhook's API version. Null until the first attempt.",
											"example": {
												"id": "cm4k2x9p10014abcd1234efgh",
												"type": "document.fully_signed",
												"createdAt": "2026-09-29T07:41:00.000Z",
												"apiVersion": "2026-10",
												"workspaceId": "cm4k2x9p10001abcd1234efgh",
												"environment": "PRODUCTION",
												"actor": null,
												"data": {
													"object": {
														"id": "cm4k2x9p10003abcd1234efgh",
														"externalId": "HR-2026-0142",
														"expiresAt": "2026-10-28T22:00:00.000Z",
														"name": "Anställningsavtal – Kai Lindqvist",
														"status": "PENDING",
														"documentMeta": {
															"subject": "Ditt anställningsavtal från Exempelbolaget AB",
															"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
															"signingMode": "PARALLEL",
															"forceReadFullDocument": true,
															"showChatToSigners": false,
															"language": "sv",
															"value": null,
															"redirectUrl": null,
															"redirectEnabled": false,
															"internalRecipients": [
																"hr@example.com"
															],
															"signableAfterExpired": false,
															"sendPlainTextEmailOnly": null,
															"reminderIntervalDays": 3,
															"allowDelegation": false,
															"openVerification": null,
															"aiChatEnabled": null,
															"nationalIdDisplayMode": null,
															"sameDeviceSigning": false,
															"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
														},
														"createdAt": "2026-09-28T09:12:00.000Z",
														"updatedAt": "2026-09-29T07:41:00.000Z",
														"completedAt": null,
														"deletedAt": null,
														"templateId": "cm4k2x9p10008abcd1234efgh",
														"folderId": "cm4k2x9p10011abcd1234efgh",
														"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
														"parties": [
															{
																"id": "cm4k2x9p10004abcd1234efgh",
																"documentId": "cm4k2x9p10003abcd1234efgh",
																"email": "kai@example.com",
																"name": "Kai Lindqvist",
																"phone": "+46701740605",
																"type": "INDIVIDUAL",
																"company": null,
																"externalId": "EMP-0142",
																"contactId": "cm4k2x9p10006abcd1234efgh",
																"nationalId": null,
																"country": "SE",
																"role": "SIGNER",
																"signingOrder": 1,
																"signedAt": "2026-09-29T07:41:00.000Z",
																"readStatus": "READ",
																"signingStatus": "SIGNED",
																"delivery": [
																	"EMAIL"
																],
																"signatureMethod": "SE_BANKID",
																"signVerification": null,
																"openVerification": null,
																"sendStatus": "DELIVERED",
																"identityVerified": true,
																"identityMismatch": false,
																"createdAt": "2026-09-28T09:12:00.000Z"
															}
														],
														"tags": [],
														"customFields": [],
														"content": null,
														"productTables": [],
														"approvalRequestId": null,
														"bundleId": null
													}
												}
											}
										},
										"attempts": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The webhook ID."
													},
													"attempt": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "The attempt number, from 1. 0 for a delivery held back while the webhook was paused."
													},
													"status": {
														"type": "string",
														"enum": [
															"SUCCESS",
															"FAILED"
														],
														"description": "If `SUCCESS`, the endpoint answered with a 2xx status code."
													},
													"responseCode": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "The HTTP status code the endpoint answered with, or 0 when no response arrived."
													},
													"durationMs": {
														"description": "How long the request took, in milliseconds. Null when sajn didn't send it, such as while the webhook was paused.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"requestHeaders": {
														"description": "The headers sajn sent. Null when sajn didn't send the request.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {
															"type": "string"
														}
													},
													"responseHeaders": {
														"description": "The headers the endpoint answered with. Null when no response arrived.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {
															"type": "string"
														}
													},
													"responseBody": {
														"anyOf": [
															{},
															{
																"type": "null"
															}
														],
														"description": "What the endpoint answered: the parsed JSON body, the text of a non-JSON body, or the network error when the request failed."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the webhook was created."
													}
												},
												"required": [
													"id",
													"attempt",
													"status",
													"responseCode",
													"durationMs",
													"requestHeaders",
													"responseHeaders",
													"responseBody",
													"createdAt"
												],
												"additionalProperties": false
											},
											"description": "Every attempt, oldest first. Empty until the first attempt."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the webhook was created."
										}
									},
									"required": [
										"id",
										"webhookId",
										"eventId",
										"type",
										"status",
										"url",
										"replayOfId",
										"requestBody",
										"attempts",
										"createdAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10013abcd1234efgh",
									"webhookId": "cm4k2x9p10013abcd1234efgh",
									"eventId": "cm4k2x9p10014abcd1234efgh",
									"type": "document.created",
									"status": "SUCCESS",
									"url": "https://example.com/webhooks/sajn",
									"replayOfId": null,
									"requestBody": {
										"id": "cm4k2x9p10014abcd1234efgh",
										"type": "document.fully_signed",
										"createdAt": "2026-09-29T07:41:00.000Z",
										"apiVersion": "2026-10",
										"workspaceId": "cm4k2x9p10001abcd1234efgh",
										"environment": "PRODUCTION",
										"actor": null,
										"data": {
											"object": {
												"id": "cm4k2x9p10003abcd1234efgh",
												"externalId": "HR-2026-0142",
												"expiresAt": "2026-10-28T22:00:00.000Z",
												"name": "Anställningsavtal – Kai Lindqvist",
												"status": "PENDING",
												"documentMeta": {
													"subject": "Ditt anställningsavtal från Exempelbolaget AB",
													"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
													"signingMode": "PARALLEL",
													"forceReadFullDocument": true,
													"showChatToSigners": false,
													"language": "sv",
													"value": null,
													"redirectUrl": null,
													"redirectEnabled": false,
													"internalRecipients": [
														"hr@example.com"
													],
													"signableAfterExpired": false,
													"sendPlainTextEmailOnly": null,
													"reminderIntervalDays": 3,
													"allowDelegation": false,
													"openVerification": null,
													"aiChatEnabled": null,
													"nationalIdDisplayMode": null,
													"sameDeviceSigning": false,
													"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
												},
												"createdAt": "2026-09-28T09:12:00.000Z",
												"updatedAt": "2026-09-29T07:41:00.000Z",
												"completedAt": null,
												"deletedAt": null,
												"templateId": "cm4k2x9p10008abcd1234efgh",
												"folderId": "cm4k2x9p10011abcd1234efgh",
												"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
												"parties": [
													{
														"id": "cm4k2x9p10004abcd1234efgh",
														"documentId": "cm4k2x9p10003abcd1234efgh",
														"email": "kai@example.com",
														"name": "Kai Lindqvist",
														"phone": "+46701740605",
														"type": "INDIVIDUAL",
														"company": null,
														"externalId": "EMP-0142",
														"contactId": "cm4k2x9p10006abcd1234efgh",
														"nationalId": null,
														"country": "SE",
														"role": "SIGNER",
														"signingOrder": 1,
														"signedAt": "2026-09-29T07:41:00.000Z",
														"readStatus": "READ",
														"signingStatus": "SIGNED",
														"delivery": [
															"EMAIL"
														],
														"signatureMethod": "SE_BANKID",
														"signVerification": null,
														"openVerification": null,
														"sendStatus": "DELIVERED",
														"identityVerified": true,
														"identityMismatch": false,
														"createdAt": "2026-09-28T09:12:00.000Z"
													}
												],
												"tags": [],
												"customFields": [],
												"content": null,
												"productTables": [],
												"approvalRequestId": null,
												"bundleId": null
											}
										}
									},
									"attempts": [
										{
											"id": "cm4k2x9p10013abcd1234efgh",
											"attempt": 1,
											"status": "SUCCESS",
											"responseCode": 200,
											"durationMs": 1,
											"requestHeaders": {
												"startdatum": "Anställningsavtal – Kai Lindqvist"
											},
											"responseHeaders": {
												"startdatum": "Anställningsavtal – Kai Lindqvist"
											},
											"responseBody": null,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "webhook"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:write"
						]
					}
				]
			}
		},
		"/api/v1/approval-requests": {
			"post": {
				"description": "Submits a `DRAFT` document for internal approval. The document's status changes to `PENDING_APPROVAL`, and sajn notifies the approvers of the first stage. When the request is approved, sajn sends the document for signing, unless approvers already on the document were set up with `autoSend` false.\n\nPass `approverIds` to set who approves; every one of them must approve. Omit it to submit the approvers already on the document, such as the ones its template adds. A template that locks its approvers returns `409 INVALID_STATE` if you pass `approverIds`.\n\nTo resubmit a rejected request, call this endpoint again. The request keeps its ID, and every approver's decision is reset, so earlier decisions aren't kept. The resubmission fires `approval_request.created` again, with the same `data.object.id`.\n\n**Permission required:** `SEND_DOCUMENT` on the workspace.",
				"summary": "Request approval of a document",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createApprovalRequest",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"documentId": {
										"type": "string",
										"minLength": 1,
										"description": "ID of a `DRAFT` document"
									},
									"approverIds": {
										"description": "User IDs of the approvers. Every one of them must approve, in any order. Omit it to submit the approvers already on the document, such as the ones its template adds. To list members who can approve, call `GET /api/v1/members?permission=APPROVE_DOCUMENT`.",
										"minItems": 1,
										"type": "array",
										"items": {
											"type": "string",
											"minLength": 1
										}
									},
									"customMessage": {
										"description": "Message to include in the signing invitation when the approved document is sent. Requires `approverIds`.",
										"type": "string"
									}
								},
								"required": [
									"documentId"
								],
								"description": "Request internal approval of a document"
							},
							"example": {
								"documentId": "cm4k2x9p10003abcd1234efgh",
								"approverIds": [
									"cm4k2x9p10041abcd1234efgh"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "An internal approval request for a document",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Approval request ID"
										},
										"documentId": {
											"type": "string",
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING",
												"APPROVED",
												"REJECTED",
												"CANCELLED"
											],
											"description": "`DRAFT` while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; `PENDING` while it waits for approvers; `APPROVED` once every stage approves; `REJECTED` after any approver rejects; `CANCELLED` only in the response to the cancel request and in the `approval_request.cancelled` event, because a cancelled request is deleted."
										},
										"autoSend": {
											"type": "boolean",
											"description": "If true, sajn sends the document for signing when the request is approved. If false, the document waits for you to send it."
										},
										"customMessage": {
											"description": "The message included in the signing invitation when the document is sent",
											"type": [
												"string",
												"null"
											]
										},
										"requestedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who submitted the request"
										},
										"approvers": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"user": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The approver"
													},
													"stage": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "Stages run in ascending order. Approvers in the same stage approve in parallel."
													},
													"orGroup": {
														"description": "Approvers in the same stage with the same `orGroup` need only one approval between them. Null when this approver's approval is required.",
														"type": [
															"string",
															"null"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"PENDING",
															"APPROVED",
															"REJECTED"
														],
														"description": "This approver's decision"
													},
													"comment": {
														"description": "The approver's comment",
														"type": [
															"string",
															"null"
														]
													},
													"resolvedAt": {
														"description": "When the approver decided",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"user",
													"stage",
													"orGroup",
													"status",
													"comment",
													"resolvedAt"
												],
												"additionalProperties": false
											},
											"description": "The approvers, ordered by stage"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was last updated."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"autoSend",
										"customMessage",
										"requestedBy",
										"approvers",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "An internal approval request for a document"
								},
								"example": {
									"id": "cm4k2x9p10029abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "APPROVED",
									"autoSend": false,
									"customMessage": "Påminnelse: signera ditt anställningsavtal senast den 28 oktober.",
									"requestedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"approvers": [
										{
											"user": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"stage": 1,
											"orGroup": "Quinn Holm",
											"status": "APPROVED",
											"comment": "Godkänt enligt lönepolicyn.",
											"resolvedAt": "2026-09-29T07:41:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "documentId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Approval not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "approval"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"get": {
				"description": "Lists the approval requests on documents you can read, newest first. A document has at most one request. To find the requests waiting for someone, pass `approverId` and `status=PENDING`; the result also lists requests whose turn for that approver hasn't come yet in a later stage.",
				"summary": "List approval requests",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "documentId",
						"in": "query",
						"description": "Only requests for these documents. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "approverId",
						"in": "query",
						"description": "Only requests where one of these users is an approver. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "status",
						"in": "query",
						"description": "Only requests with one of these statuses. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"DRAFT",
									"PENDING",
									"APPROVED",
									"REJECTED"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getApprovalRequests",
				"responses": {
					"200": {
						"description": "Approval requests, newest first",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Approval request ID"
													},
													"documentId": {
														"type": "string",
														"description": "The document ID."
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING",
															"APPROVED",
															"REJECTED",
															"CANCELLED"
														],
														"description": "`DRAFT` while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; `PENDING` while it waits for approvers; `APPROVED` once every stage approves; `REJECTED` after any approver rejects; `CANCELLED` only in the response to the cancel request and in the `approval_request.cancelled` event, because a cancelled request is deleted."
													},
													"autoSend": {
														"type": "boolean",
														"description": "If true, sajn sends the document for signing when the request is approved. If false, the document waits for you to send it."
													},
													"customMessage": {
														"description": "The message included in the signing invitation when the document is sent",
														"type": [
															"string",
															"null"
														]
													},
													"requestedBy": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The user who submitted the request"
													},
													"approvers": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"user": {
																	"type": "object",
																	"properties": {
																		"id": {
																			"type": "string",
																			"description": "User ID"
																		},
																		"email": {
																			"type": "string"
																		},
																		"name": {
																			"description": "Full name. Null when the user has no name.",
																			"type": [
																				"string",
																				"null"
																			]
																		}
																	},
																	"required": [
																		"id",
																		"email",
																		"name"
																	],
																	"additionalProperties": false,
																	"description": "The approver"
																},
																"stage": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991,
																	"description": "Stages run in ascending order. Approvers in the same stage approve in parallel."
																},
																"orGroup": {
																	"description": "Approvers in the same stage with the same `orGroup` need only one approval between them. Null when this approver's approval is required.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"status": {
																	"type": "string",
																	"enum": [
																		"PENDING",
																		"APPROVED",
																		"REJECTED"
																	],
																	"description": "This approver's decision"
																},
																"comment": {
																	"description": "The approver's comment",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"resolvedAt": {
																	"description": "When the approver decided",
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"user",
																"stage",
																"orGroup",
																"status",
																"comment",
																"resolvedAt"
															],
															"additionalProperties": false
														},
														"description": "The approvers, ordered by stage"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the approval was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the approval was last updated."
													}
												},
												"required": [
													"id",
													"documentId",
													"status",
													"autoSend",
													"customMessage",
													"requestedBy",
													"approvers",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"description": "An internal approval request for a document"
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Approval requests, newest first"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10029abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"status": "APPROVED",
											"autoSend": false,
											"customMessage": "Påminnelse: signera ditt anställningsavtal senast den 28 oktober.",
											"requestedBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"approvers": [
												{
													"user": {
														"id": "cm4k2x9p10002abcd1234efgh",
														"email": "alex@example.com",
														"name": "Alex Berg"
													},
													"stage": 1,
													"orGroup": "Quinn Holm",
													"status": "APPROVED",
													"comment": "Godkänt enligt lönepolicyn.",
													"resolvedAt": "2026-09-29T07:41:00.000Z"
												}
											],
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/approval-requests/{id}": {
			"get": {
				"description": "Gets an approval request, with each approver's stage and decision.",
				"summary": "Get an approval request",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The approval ID.",
						"example": "cm4k2x9p10029abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getApprovalRequest",
				"responses": {
					"200": {
						"description": "An internal approval request for a document",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Approval request ID"
										},
										"documentId": {
											"type": "string",
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING",
												"APPROVED",
												"REJECTED",
												"CANCELLED"
											],
											"description": "`DRAFT` while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; `PENDING` while it waits for approvers; `APPROVED` once every stage approves; `REJECTED` after any approver rejects; `CANCELLED` only in the response to the cancel request and in the `approval_request.cancelled` event, because a cancelled request is deleted."
										},
										"autoSend": {
											"type": "boolean",
											"description": "If true, sajn sends the document for signing when the request is approved. If false, the document waits for you to send it."
										},
										"customMessage": {
											"description": "The message included in the signing invitation when the document is sent",
											"type": [
												"string",
												"null"
											]
										},
										"requestedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who submitted the request"
										},
										"approvers": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"user": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The approver"
													},
													"stage": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "Stages run in ascending order. Approvers in the same stage approve in parallel."
													},
													"orGroup": {
														"description": "Approvers in the same stage with the same `orGroup` need only one approval between them. Null when this approver's approval is required.",
														"type": [
															"string",
															"null"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"PENDING",
															"APPROVED",
															"REJECTED"
														],
														"description": "This approver's decision"
													},
													"comment": {
														"description": "The approver's comment",
														"type": [
															"string",
															"null"
														]
													},
													"resolvedAt": {
														"description": "When the approver decided",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"user",
													"stage",
													"orGroup",
													"status",
													"comment",
													"resolvedAt"
												],
												"additionalProperties": false
											},
											"description": "The approvers, ordered by stage"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was last updated."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"autoSend",
										"customMessage",
										"requestedBy",
										"approvers",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "An internal approval request for a document"
								},
								"example": {
									"id": "cm4k2x9p10029abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "APPROVED",
									"autoSend": false,
									"customMessage": "Påminnelse: signera ditt anställningsavtal senast den 28 oktober.",
									"requestedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"approvers": [
										{
											"user": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"stage": 1,
											"orGroup": "Quinn Holm",
											"status": "APPROVED",
											"comment": "Godkänt enligt lönepolicyn.",
											"resolvedAt": "2026-09-29T07:41:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Approval not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "approval"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/approval-requests/{id}/approve": {
			"post": {
				"description": "Approves the request as the authenticated user, who must be an approver in the current stage. You can't approve on someone else's behalf. When the last required approver approves, the request becomes `APPROVED`, and with `autoSend` set to true, sajn sends the document for signing.\n\n**Permission required:** `APPROVE_DOCUMENT` on the workspace.",
				"summary": "Approve an approval request",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The approval ID.",
						"example": "cm4k2x9p10029abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "approveApprovalRequest",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"comment": {
										"description": "Optional comment from the approver",
										"type": "string"
									}
								},
								"description": "Approve a document"
							},
							"example": {
								"comment": "Godkänt enligt lönepolicyn."
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "An internal approval request for a document",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Approval request ID"
										},
										"documentId": {
											"type": "string",
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING",
												"APPROVED",
												"REJECTED",
												"CANCELLED"
											],
											"description": "`DRAFT` while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; `PENDING` while it waits for approvers; `APPROVED` once every stage approves; `REJECTED` after any approver rejects; `CANCELLED` only in the response to the cancel request and in the `approval_request.cancelled` event, because a cancelled request is deleted."
										},
										"autoSend": {
											"type": "boolean",
											"description": "If true, sajn sends the document for signing when the request is approved. If false, the document waits for you to send it."
										},
										"customMessage": {
											"description": "The message included in the signing invitation when the document is sent",
											"type": [
												"string",
												"null"
											]
										},
										"requestedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who submitted the request"
										},
										"approvers": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"user": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The approver"
													},
													"stage": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "Stages run in ascending order. Approvers in the same stage approve in parallel."
													},
													"orGroup": {
														"description": "Approvers in the same stage with the same `orGroup` need only one approval between them. Null when this approver's approval is required.",
														"type": [
															"string",
															"null"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"PENDING",
															"APPROVED",
															"REJECTED"
														],
														"description": "This approver's decision"
													},
													"comment": {
														"description": "The approver's comment",
														"type": [
															"string",
															"null"
														]
													},
													"resolvedAt": {
														"description": "When the approver decided",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"user",
													"stage",
													"orGroup",
													"status",
													"comment",
													"resolvedAt"
												],
												"additionalProperties": false
											},
											"description": "The approvers, ordered by stage"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was last updated."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"autoSend",
										"customMessage",
										"requestedBy",
										"approvers",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "An internal approval request for a document"
								},
								"example": {
									"id": "cm4k2x9p10029abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "APPROVED",
									"autoSend": false,
									"customMessage": "Påminnelse: signera ditt anställningsavtal senast den 28 oktober.",
									"requestedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"approvers": [
										{
											"user": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"stage": 1,
											"orGroup": "Quinn Holm",
											"status": "APPROVED",
											"comment": "Godkänt enligt lönepolicyn.",
											"resolvedAt": "2026-09-29T07:41:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "comment",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Approval not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "approval"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/approval-requests/{id}/reject": {
			"post": {
				"description": "Rejects the request as the authenticated user, who must be an approver in the current stage. A comment is required. One rejection rejects the whole request, and the document returns to `DRAFT` so the requester can edit it and resubmit.\n\n**Permission required:** `APPROVE_DOCUMENT` on the workspace.",
				"summary": "Reject an approval request",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The approval ID.",
						"example": "cm4k2x9p10029abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "rejectApprovalRequest",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"comment": {
										"type": "string",
										"minLength": 1,
										"description": "Required comment explaining why the document was rejected"
									}
								},
								"required": [
									"comment"
								],
								"description": "Reject a document"
							},
							"example": {
								"comment": "Godkänt enligt lönepolicyn."
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "An internal approval request for a document",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Approval request ID"
										},
										"documentId": {
											"type": "string",
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING",
												"APPROVED",
												"REJECTED",
												"CANCELLED"
											],
											"description": "`DRAFT` while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; `PENDING` while it waits for approvers; `APPROVED` once every stage approves; `REJECTED` after any approver rejects; `CANCELLED` only in the response to the cancel request and in the `approval_request.cancelled` event, because a cancelled request is deleted."
										},
										"autoSend": {
											"type": "boolean",
											"description": "If true, sajn sends the document for signing when the request is approved. If false, the document waits for you to send it."
										},
										"customMessage": {
											"description": "The message included in the signing invitation when the document is sent",
											"type": [
												"string",
												"null"
											]
										},
										"requestedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who submitted the request"
										},
										"approvers": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"user": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The approver"
													},
													"stage": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "Stages run in ascending order. Approvers in the same stage approve in parallel."
													},
													"orGroup": {
														"description": "Approvers in the same stage with the same `orGroup` need only one approval between them. Null when this approver's approval is required.",
														"type": [
															"string",
															"null"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"PENDING",
															"APPROVED",
															"REJECTED"
														],
														"description": "This approver's decision"
													},
													"comment": {
														"description": "The approver's comment",
														"type": [
															"string",
															"null"
														]
													},
													"resolvedAt": {
														"description": "When the approver decided",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"user",
													"stage",
													"orGroup",
													"status",
													"comment",
													"resolvedAt"
												],
												"additionalProperties": false
											},
											"description": "The approvers, ordered by stage"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was last updated."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"autoSend",
										"customMessage",
										"requestedBy",
										"approvers",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "An internal approval request for a document"
								},
								"example": {
									"id": "cm4k2x9p10029abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "APPROVED",
									"autoSend": false,
									"customMessage": "Påminnelse: signera ditt anställningsavtal senast den 28 oktober.",
									"requestedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"approvers": [
										{
											"user": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"stage": 1,
											"orGroup": "Quinn Holm",
											"status": "APPROVED",
											"comment": "Godkänt enligt lönepolicyn.",
											"resolvedAt": "2026-09-29T07:41:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "comment",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Approval not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "approval"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/approval-requests/{id}/cancel": {
			"post": {
				"description": "Cancels a `PENDING` request. Only the user who submitted it can cancel it. sajn deletes the request, so the response is the last state of the request with `status` set to `CANCELLED`, and `GET /api/v1/approval-requests/{id}` returns `404` afterwards. The `approval_request.cancelled` event carries the same last state, so it's the only record of the request. The document returns to `DRAFT`.\n\n**Permission required:** `SEND_DOCUMENT` on the workspace.",
				"summary": "Cancel an approval request",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The approval ID.",
						"example": "cm4k2x9p10029abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "cancelApprovalRequest",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {}
							},
							"example": {}
						}
					}
				},
				"responses": {
					"200": {
						"description": "An internal approval request for a document",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Approval request ID"
										},
										"documentId": {
											"type": "string",
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING",
												"APPROVED",
												"REJECTED",
												"CANCELLED"
											],
											"description": "`DRAFT` while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; `PENDING` while it waits for approvers; `APPROVED` once every stage approves; `REJECTED` after any approver rejects; `CANCELLED` only in the response to the cancel request and in the `approval_request.cancelled` event, because a cancelled request is deleted."
										},
										"autoSend": {
											"type": "boolean",
											"description": "If true, sajn sends the document for signing when the request is approved. If false, the document waits for you to send it."
										},
										"customMessage": {
											"description": "The message included in the signing invitation when the document is sent",
											"type": [
												"string",
												"null"
											]
										},
										"requestedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who submitted the request"
										},
										"approvers": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"user": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The approver"
													},
													"stage": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "Stages run in ascending order. Approvers in the same stage approve in parallel."
													},
													"orGroup": {
														"description": "Approvers in the same stage with the same `orGroup` need only one approval between them. Null when this approver's approval is required.",
														"type": [
															"string",
															"null"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"PENDING",
															"APPROVED",
															"REJECTED"
														],
														"description": "This approver's decision"
													},
													"comment": {
														"description": "The approver's comment",
														"type": [
															"string",
															"null"
														]
													},
													"resolvedAt": {
														"description": "When the approver decided",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"user",
													"stage",
													"orGroup",
													"status",
													"comment",
													"resolvedAt"
												],
												"additionalProperties": false
											},
											"description": "The approvers, ordered by stage"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the approval was last updated."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"autoSend",
										"customMessage",
										"requestedBy",
										"approvers",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "An internal approval request for a document"
								},
								"example": {
									"id": "cm4k2x9p10029abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "APPROVED",
									"autoSend": false,
									"customMessage": "Påminnelse: signera ditt anställningsavtal senast den 28 oktober.",
									"requestedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"approvers": [
										{
											"user": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"stage": 1,
											"orGroup": "Quinn Holm",
											"status": "APPROVED",
											"comment": "Godkänt enligt lönepolicyn.",
											"resolvedAt": "2026-09-29T07:41:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Approval not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "approval"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/templates": {
			"get": {
				"description": "Retrieve a paginated list of all templates in your workspace.\n\nTemplates let you predefine document structure, fields, and default parties, then spawn documents from them via `POST /api/v1/documents` with `templateId`.\n\n**Pagination:** Pass `nextCursor` from the previous response as `cursor` until `hasMore` is false.\n**Search:** Use `query` to filter by template name.",
				"summary": "List all templates",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "query",
						"in": "query",
						"description": "Search template names (partial match)",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "tagId",
						"in": "query",
						"description": "Filter by one or more tag IDs. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "folderId",
						"in": "query",
						"description": "Filter by folder ID. Pass `root` to include only top-level templates.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdById",
						"in": "query",
						"description": "Filter by creator user IDs. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "private",
						"in": "query",
						"description": "If `true`, returns only private templates. If `false`, returns only public ones.",
						"schema": {
							"type": "boolean"
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only templates created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only templates created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only templates updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only templates updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getTemplates",
				"responses": {
					"200": {
						"description": "Paginated list of templates",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template identifier"
													},
													"name": {
														"type": "string",
														"description": "Template name/title"
													},
													"workspaceId": {
														"description": "Workspace ID this template belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"organizationId": {
														"description": "Organization ID this template belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"createdBy": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The user who created the template"
													},
													"isGlobal": {
														"type": "boolean",
														"description": "Whether this is a global template"
													},
													"templateMeta": {
														"description": "The settings that documents created from the template start with",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"signingMode": {
																"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"PARALLEL",
																	"SEQUENTIAL",
																	null
																]
															},
															"forceReadFullDocument": {
																"description": "Whether signers must read the entire document before signing",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"showChatToSigners": {
																"description": "Whether to show document chat to signers",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"language": {
																"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"sv",
																	"en",
																	"no",
																	"da",
																	"fi",
																	"de",
																	"is",
																	"es",
																	"fr",
																	"it",
																	null
																]
															},
															"value": {
																"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
																"type": [
																	"string",
																	"null"
																]
															},
															"signableAfterExpired": {
																"description": "Whether documents created from this template remain signable after expiration",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"sendPlainTextEmailOnly": {
																"description": "Send plain text email invitations only (no HTML)",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"allowDelegation": {
																"description": "Whether signers may delegate signing to another person",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"reminderIntervalDays": {
																"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
																"type": [
																	"integer",
																	"null"
																],
																"minimum": -9007199254740991,
																"maximum": 9007199254740991
															},
															"responsibleUserId": {
																"description": "Default responsible user ID",
																"type": [
																	"string",
																	"null"
																]
															},
															"openVerification": {
																"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"PIN",
																	"SMS",
																	"EMAIL",
																	"SE_BANKID",
																	"NO_BANKID_BIOMETRIC",
																	"NO_BANKID_HIGH",
																	"DK_MITID",
																	"DK_MITID_ERHVERV",
																	"FI_FTN",
																	"NL_IDIN",
																	null
																]
															},
															"internalRecipients": {
																"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
																"type": [
																	"array",
																	"null"
																],
																"items": {
																	"type": "string"
																}
															},
															"visibility": {
																"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"EVERYONE",
																	"RESPONSIBLE",
																	"PERMISSION",
																	"USER_SPECIFIC",
																	null
																]
															},
															"selectedUserIds": {
																"description": "User IDs granted access when visibility is USER_SPECIFIC",
																"type": [
																	"array",
																	"null"
																],
																"items": {
																	"type": "string"
																}
															},
															"nationalIdDisplayMode": {
																"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
																"type": [
																	"string",
																	"null"
																],
																"enum": [
																	"FULL",
																	"PARTIAL",
																	"NONE",
																	null
																]
															},
															"sameDeviceSigning": {
																"description": "Whether all parties sign in sequence on one device",
																"type": [
																	"boolean",
																	"null"
																]
															},
															"documentCategoryId": {
																"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"signingMode",
															"forceReadFullDocument",
															"showChatToSigners",
															"language",
															"value",
															"signableAfterExpired",
															"sendPlainTextEmailOnly",
															"allowDelegation",
															"reminderIntervalDays",
															"responsibleUserId",
															"openVerification",
															"internalRecipients",
															"visibility",
															"selectedUserIds",
															"nationalIdDisplayMode",
															"sameDeviceSigning",
															"documentCategoryId"
														],
														"additionalProperties": false
													},
													"parties": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "Unique template party identifier"
																},
																"templateId": {
																	"type": "string",
																	"description": "Template ID this party belongs to"
																},
																"name": {
																	"type": "string",
																	"description": "Party name"
																},
																"email": {
																	"description": "Party email address",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"phone": {
																	"description": "Party phone number",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"INDIVIDUAL",
																		"COMPANY"
																	],
																	"description": "Party type: INDIVIDUAL or COMPANY"
																},
																"role": {
																	"type": "string",
																	"enum": [
																		"SIGNER",
																		"ORGANIZER",
																		"REVIEWER"
																	],
																	"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
																},
																"signingOrder": {
																	"description": "Order for sequential signing",
																	"type": [
																		"number",
																		"null"
																	]
																},
																"contactId": {
																	"description": "Linked contact ID",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"company": {
																	"description": "The company the party signs for, or null for a private individual",
																	"type": [
																		"object",
																		"null"
																	],
																	"properties": {
																		"id": {
																			"description": "ID of the linked company in your workspace",
																			"type": [
																				"string",
																				"null"
																			]
																		},
																		"name": {
																			"description": "Company name",
																			"type": [
																				"string",
																				"null"
																			]
																		},
																		"orgNumber": {
																			"description": "Company organization number",
																			"type": [
																				"string",
																				"null"
																			]
																		},
																		"role": {
																			"description": "The party's role or title at the company",
																			"type": [
																				"string",
																				"null"
																			]
																		}
																	},
																	"required": [
																		"id",
																		"name",
																		"orgNumber",
																		"role"
																	],
																	"additionalProperties": false
																},
																"externalId": {
																	"description": "External reference ID",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"nationalId": {
																	"description": "National identity number, such as a Swedish personnummer",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"country": {
																	"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"signatureMethod": {
																	"description": "Default signature method",
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"NONE",
																		"DRAWING",
																		"SE_BANKID",
																		"MANUAL",
																		"CLICK_TO_SIGN",
																		"NO_BANKID_BIOMETRIC",
																		"NO_BANKID_HIGH",
																		"NO_QES",
																		"DK_MITID",
																		"DK_MITID_ERHVERV",
																		"FI_FTN",
																		"NL_IDIN",
																		"ZEALID_QES",
																		null
																	]
																},
																"delivery": {
																	"type": "array",
																	"items": {
																		"type": "string",
																		"enum": [
																			"EMAIL",
																			"SMS",
																			"IN_APP"
																		]
																	},
																	"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
																},
																"signVerification": {
																	"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
																	"type": [
																		"string",
																		"null"
																	],
																	"enum": [
																		"PIN",
																		"SMS",
																		"EMAIL",
																		"SE_BANKID",
																		"NO_BANKID_BIOMETRIC",
																		"NO_BANKID_HIGH",
																		"DK_MITID",
																		"DK_MITID_ERHVERV",
																		"FI_FTN",
																		"NL_IDIN",
																		null
																	]
																},
																"createdAt": {
																	"description": "When the party was added to the template",
																	"type": "string",
																	"format": "date-time"
																},
																"updatedAt": {
																	"description": "When the party was last changed",
																	"type": "string",
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"templateId",
																"name",
																"email",
																"phone",
																"type",
																"role",
																"signingOrder",
																"contactId",
																"company",
																"externalId",
																"nationalId",
																"country",
																"signatureMethod",
																"delivery",
																"signVerification",
																"createdAt",
																"updatedAt"
															],
															"additionalProperties": false
														},
														"description": "The default parties that documents created from the template start with"
													},
													"tags": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The tag ID."
																},
																"name": {
																	"type": "string"
																},
																"color": {
																	"type": "string"
																}
															},
															"required": [
																"id",
																"name",
																"color"
															],
															"additionalProperties": false
														},
														"description": "Tags applied to this template"
													},
													"content": {
														"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
														"type": [
															"array",
															"null"
														],
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "Unique field identifier"
																},
																"documentId": {
																	"description": "Document this field belongs to",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"templateId": {
																	"description": "Template this field belongs to",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT",
																		"HTML",
																		"FORM",
																		"PDF",
																		"PRODUCT_TABLE",
																		"TABLE",
																		"SPACER",
																		"PAGE_BREAK",
																		"DURATION"
																	],
																	"description": "Field type"
																},
																"position": {
																	"type": "number",
																	"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
																},
																"fieldMeta": {
																	"anyOf": [
																		{
																			"oneOf": [
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT"
																							]
																						},
																						"content": {
																							"type": "string"
																						},
																						"locked": {
																							"type": "boolean"
																						},
																						"sectionStyle": {
																							"type": "object",
																							"properties": {
																								"background": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"MUTED",
																										"TINT",
																										"ACCENT",
																										"DARK"
																									]
																								},
																								"padding": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"SM",
																										"MD",
																										"LG"
																									]
																								},
																								"bleed": {
																									"type": "boolean"
																								},
																								"border": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"visibilityRule": {
																							"type": "object",
																							"properties": {
																								"customFieldId": {
																									"type": "string",
																									"minLength": 1
																								},
																								"equals": {
																									"type": "string"
																								},
																								"mode": {
																									"type": "string",
																									"enum": [
																										"SHOW_WHEN",
																										"HIDE_WHEN"
																									]
																								}
																							},
																							"required": [
																								"customFieldId",
																								"equals",
																								"mode"
																							],
																							"additionalProperties": false
																						},
																						"hidden": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"HTML"
																							]
																						},
																						"content": {
																							"type": "string"
																						},
																						"locked": {
																							"type": "boolean"
																						},
																						"sectionStyle": {
																							"type": "object",
																							"properties": {
																								"background": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"MUTED",
																										"TINT",
																										"ACCENT",
																										"DARK"
																									]
																								},
																								"padding": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"SM",
																										"MD",
																										"LG"
																									]
																								},
																								"bleed": {
																									"type": "boolean"
																								},
																								"border": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"visibilityRule": {
																							"type": "object",
																							"properties": {
																								"customFieldId": {
																									"type": "string",
																									"minLength": 1
																								},
																								"equals": {
																									"type": "string"
																								},
																								"mode": {
																									"type": "string",
																									"enum": [
																										"SHOW_WHEN",
																										"HIDE_WHEN"
																									]
																								}
																							},
																							"required": [
																								"customFieldId",
																								"equals",
																								"mode"
																							],
																							"additionalProperties": false
																						},
																						"hidden": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"PDF"
																							]
																						},
																						"value": {
																							"type": "string"
																						},
																						"numPages": {
																							"type": "number"
																						},
																						"pageIndex": {
																							"type": "integer",
																							"minimum": 0,
																							"maximum": 9007199254740991
																						},
																						"instruction": {
																							"type": "string"
																						},
																						"formFields": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"name": {
																										"type": "string"
																									},
																									"type": {
																										"type": "string",
																										"enum": [
																											"TEXT",
																											"CHECKBOX",
																											"DROPDOWN",
																											"RADIO"
																										]
																									},
																									"page": {
																										"type": "integer",
																										"minimum": 1,
																										"maximum": 9007199254740991,
																										"description": "The page the box is on, counted from 1."
																									},
																									"rect": {
																										"type": "object",
																										"properties": {
																											"x": {
																												"type": "number"
																											},
																											"y": {
																												"type": "number"
																											},
																											"width": {
																												"type": "number",
																												"exclusiveMinimum": 0
																											},
																											"height": {
																												"type": "number",
																												"exclusiveMinimum": 0
																											}
																										},
																										"required": [
																											"x",
																											"y",
																											"width",
																											"height"
																										],
																										"additionalProperties": false,
																										"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																									},
																									"pageWidth": {
																										"type": "number",
																										"exclusiveMinimum": 0
																									},
																									"pageHeight": {
																										"type": "number",
																										"exclusiveMinimum": 0
																									},
																									"pageRotation": {
																										"anyOf": [
																											{
																												"type": "number",
																												"enum": [
																													0
																												]
																											},
																											{
																												"type": "number",
																												"enum": [
																													90
																												]
																											},
																											{
																												"type": "number",
																												"enum": [
																													180
																												]
																											},
																											{
																												"type": "number",
																												"enum": [
																													270
																												]
																											}
																										]
																									},
																									"options": {
																										"type": "array",
																										"items": {
																											"type": "string"
																										}
																									},
																									"required": {
																										"type": "boolean"
																									},
																									"readOnly": {
																										"type": "boolean"
																									},
																									"multiline": {
																										"type": "boolean"
																									},
																									"exportValue": {
																										"type": "string"
																									}
																								},
																								"required": [
																									"name",
																									"type",
																									"page",
																									"rect",
																									"pageWidth",
																									"pageHeight"
																								],
																								"additionalProperties": {}
																							}
																						},
																						"formValues": {
																							"type": "object",
																							"additionalProperties": {
																								"type": [
																									"string",
																									"boolean"
																								]
																							}
																						},
																						"placedFields": {
																							"type": "array",
																							"items": {
																								"oneOf": [
																									{
																										"type": "object",
																										"properties": {
																											"id": {
																												"type": "string",
																												"minLength": 1
																											},
																											"page": {
																												"type": "integer",
																												"minimum": 1,
																												"maximum": 9007199254740991,
																												"description": "The page the box is on, counted from 1."
																											},
																											"rect": {
																												"type": "object",
																												"properties": {
																													"x": {
																														"type": "number"
																													},
																													"y": {
																														"type": "number"
																													},
																													"width": {
																														"type": "number",
																														"exclusiveMinimum": 0
																													},
																													"height": {
																														"type": "number",
																														"exclusiveMinimum": 0
																													}
																												},
																												"required": [
																													"x",
																													"y",
																													"width",
																													"height"
																												],
																												"additionalProperties": false,
																												"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																											},
																											"pageWidth": {
																												"type": "number",
																												"exclusiveMinimum": 0
																											},
																											"pageHeight": {
																												"type": "number",
																												"exclusiveMinimum": 0
																											},
																											"pageRotation": {
																												"anyOf": [
																													{
																														"type": "number",
																														"enum": [
																															0
																														]
																													},
																													{
																														"type": "number",
																														"enum": [
																															90
																														]
																													},
																													{
																														"type": "number",
																														"enum": [
																															180
																														]
																													},
																													{
																														"type": "number",
																														"enum": [
																															270
																														]
																													}
																												]
																											},
																											"name": {
																												"type": "string"
																											},
																											"key": {
																												"type": "string",
																												"pattern": "^[a-z0-9_-]*$"
																											},
																											"locked": {
																												"type": "boolean"
																											},
																											"style": {
																												"type": "object",
																												"properties": {
																													"fontSize": {
																														"type": "number",
																														"minimum": 6,
																														"maximum": 72
																													},
																													"color": {
																														"type": "string",
																														"pattern": "^#[0-9a-fA-F]{6}$"
																													},
																													"bold": {
																														"type": "boolean"
																													},
																													"italic": {
																														"type": "boolean"
																													},
																													"align": {
																														"type": "string",
																														"enum": [
																															"LEFT",
																															"CENTER",
																															"RIGHT"
																														]
																													}
																												},
																												"additionalProperties": false
																											},
																											"kind": {
																												"type": "string",
																												"enum": [
																													"INPUT"
																												]
																											},
																											"inputType": {
																												"type": "string",
																												"enum": [
																													"TEXT",
																													"DATE",
																													"CHECKBOX",
																													"SELECT",
																													"DRAW",
																													"SIGNATURE",
																													"INITIALS"
																												]
																											},
																											"label": {
																												"type": "string"
																											},
																											"fillSource": {
																												"type": "string",
																												"enum": [
																													"SIGNER",
																													"FIXED",
																													"NONE",
																													"VARIABLE"
																												]
																											},
																											"partyId": {
																												"type": "string"
																											},
																											"variableId": {
																												"type": "string"
																											},
																											"identity": {
																												"type": "string",
																												"enum": [
																													"name",
																													"ssn"
																												]
																											},
																											"drawn": {
																												"type": "boolean"
																											},
																											"required": {
																												"type": "boolean"
																											},
																											"options": {
																												"type": "array",
																												"items": {
																													"type": "string"
																												}
																											},
																											"multiline": {
																												"type": "boolean"
																											},
																											"format": {
																												"type": "string",
																												"enum": [
																													"email",
																													"phone",
																													"personnummer",
																													"orgnr",
																													"number"
																												]
																											},
																											"min": {
																												"type": "number"
																											},
																											"max": {
																												"type": "number"
																											},
																											"decimals": {
																												"type": "integer",
																												"minimum": 0,
																												"maximum": 6
																											},
																											"step": {
																												"type": "number",
																												"exclusiveMinimum": 0
																											}
																										},
																										"required": [
																											"id",
																											"page",
																											"rect",
																											"pageWidth",
																											"pageHeight",
																											"kind",
																											"inputType"
																										],
																										"additionalProperties": {}
																									},
																									{
																										"type": "object",
																										"properties": {
																											"id": {
																												"type": "string",
																												"minLength": 1
																											},
																											"page": {
																												"type": "integer",
																												"minimum": 1,
																												"maximum": 9007199254740991,
																												"description": "The page the box is on, counted from 1."
																											},
																											"rect": {
																												"type": "object",
																												"properties": {
																													"x": {
																														"type": "number"
																													},
																													"y": {
																														"type": "number"
																													},
																													"width": {
																														"type": "number",
																														"exclusiveMinimum": 0
																													},
																													"height": {
																														"type": "number",
																														"exclusiveMinimum": 0
																													}
																												},
																												"required": [
																													"x",
																													"y",
																													"width",
																													"height"
																												],
																												"additionalProperties": false,
																												"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																											},
																											"pageWidth": {
																												"type": "number",
																												"exclusiveMinimum": 0
																											},
																											"pageHeight": {
																												"type": "number",
																												"exclusiveMinimum": 0
																											},
																											"pageRotation": {
																												"anyOf": [
																													{
																														"type": "number",
																														"enum": [
																															0
																														]
																													},
																													{
																														"type": "number",
																														"enum": [
																															90
																														]
																													},
																													{
																														"type": "number",
																														"enum": [
																															180
																														]
																													},
																													{
																														"type": "number",
																														"enum": [
																															270
																														]
																													}
																												]
																											},
																											"name": {
																												"type": "string"
																											},
																											"key": {
																												"type": "string",
																												"pattern": "^[a-z0-9_-]*$"
																											},
																											"locked": {
																												"type": "boolean"
																											},
																											"style": {
																												"type": "object",
																												"properties": {
																													"fontSize": {
																														"type": "number",
																														"minimum": 6,
																														"maximum": 72
																													},
																													"color": {
																														"type": "string",
																														"pattern": "^#[0-9a-fA-F]{6}$"
																													},
																													"bold": {
																														"type": "boolean"
																													},
																													"italic": {
																														"type": "boolean"
																													},
																													"align": {
																														"type": "string",
																														"enum": [
																															"LEFT",
																															"CENTER",
																															"RIGHT"
																														]
																													}
																												},
																												"additionalProperties": false
																											},
																											"kind": {
																												"type": "string",
																												"enum": [
																													"STATIC"
																												]
																											},
																											"content": {
																												"type": "string"
																											},
																											"text": {
																												"type": "string"
																											}
																										},
																										"required": [
																											"id",
																											"page",
																											"rect",
																											"pageWidth",
																											"pageHeight",
																											"kind"
																										],
																										"additionalProperties": {}
																									}
																								]
																							}
																						},
																						"locked": {
																							"type": "boolean"
																						},
																						"visibilityRule": {
																							"type": "object",
																							"properties": {
																								"customFieldId": {
																									"type": "string",
																									"minLength": 1
																								},
																								"equals": {
																									"type": "string"
																								},
																								"mode": {
																									"type": "string",
																									"enum": [
																										"SHOW_WHEN",
																										"HIDE_WHEN"
																									]
																								}
																							},
																							"required": [
																								"customFieldId",
																								"equals",
																								"mode"
																							],
																							"additionalProperties": false
																						},
																						"hidden": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"FORM"
																							]
																						},
																						"columns": {
																							"type": "number",
																							"minimum": 1
																						},
																						"fields": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"id": {
																										"type": "string",
																										"minLength": 1
																									},
																									"key": {
																										"type": "string",
																										"pattern": "^[a-z0-9_-]*$"
																									},
																									"type": {
																										"type": "string",
																										"enum": [
																											"INPUT",
																											"TEXT",
																											"SELECT",
																											"DATEPICKER",
																											"RADIO",
																											"CHECKBOX",
																											"NUMBER",
																											"ATTACHMENT"
																										]
																									},
																									"row": {
																										"type": "number",
																										"minimum": 0
																									},
																									"column": {
																										"type": "number",
																										"minimum": 0
																									},
																									"colSpan": {
																										"type": "integer",
																										"exclusiveMinimum": 0,
																										"maximum": 9007199254740991
																									},
																									"fieldMeta": {
																										"oneOf": [
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"INPUT"
																														]
																													},
																													"value": {
																														"type": "string"
																													},
																													"format": {
																														"type": "string",
																														"enum": [
																															"email",
																															"phone",
																															"personnummer",
																															"orgnr"
																														]
																													},
																													"identity": {
																														"type": "string",
																														"enum": [
																															"name",
																															"ssn"
																														]
																													},
																													"maxLength": {
																														"type": "integer",
																														"exclusiveMinimum": 0,
																														"maximum": 10000
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											},
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"TEXT"
																														]
																													},
																													"value": {
																														"type": "string"
																													},
																													"rows": {
																														"type": "integer",
																														"minimum": 2,
																														"maximum": 20
																													},
																													"maxLength": {
																														"type": "integer",
																														"exclusiveMinimum": 0,
																														"maximum": 10000
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											},
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"SELECT"
																														]
																													},
																													"options": {
																														"type": "array",
																														"items": {
																															"type": "object",
																															"properties": {
																																"value": {
																																	"type": "string"
																																}
																															},
																															"required": [
																																"value"
																															],
																															"additionalProperties": false
																														}
																													},
																													"defaultValue": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											},
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"DATEPICKER"
																														]
																													},
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											},
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"RADIO"
																														]
																													},
																													"options": {
																														"type": "array",
																														"items": {
																															"type": "object",
																															"properties": {
																																"value": {
																																	"type": "string"
																																}
																															},
																															"required": [
																																"value"
																															],
																															"additionalProperties": false
																														}
																													},
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											},
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"CHECKBOX"
																														]
																													},
																													"options": {
																														"type": "array",
																														"items": {
																															"type": "object",
																															"properties": {
																																"value": {
																																	"type": "string"
																																}
																															},
																															"required": [
																																"value"
																															],
																															"additionalProperties": false
																														}
																													},
																													"values": {
																														"type": "array",
																														"items": {
																															"type": "string"
																														}
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											},
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"NUMBER"
																														]
																													},
																													"value": {
																														"type": "string"
																													},
																													"min": {
																														"type": "number"
																													},
																													"max": {
																														"type": "number"
																													},
																													"decimals": {
																														"type": "integer",
																														"minimum": 0,
																														"maximum": 6
																													},
																													"step": {
																														"type": "number",
																														"exclusiveMinimum": 0
																													},
																													"unit": {
																														"type": "string",
																														"maxLength": 12
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											},
																											{
																												"type": "object",
																												"properties": {
																													"label": {
																														"type": "string"
																													},
																													"placeholder": {
																														"type": "string"
																													},
																													"description": {
																														"type": "string"
																													},
																													"partyId": {
																														"type": [
																															"string",
																															"null"
																														]
																													},
																													"required": {
																														"type": "boolean"
																													},
																													"type": {
																														"type": "string",
																														"enum": [
																															"ATTACHMENT"
																														]
																													},
																													"appendixLabel": {
																														"type": "string"
																													},
																													"allowedTypes": {
																														"type": "array",
																														"items": {
																															"type": "string",
																															"enum": [
																																"PDF",
																																"IMAGE"
																															]
																														}
																													},
																													"includeInDocument": {
																														"type": "boolean"
																													},
																													"value": {
																														"type": "object",
																														"properties": {
																															"filename": {
																																"type": "string"
																															},
																															"mimeType": {
																																"type": "string"
																															},
																															"size": {
																																"type": "number",
																																"description": "Size in bytes"
																															}
																														},
																														"required": [
																															"filename",
																															"mimeType",
																															"size"
																														],
																														"additionalProperties": {},
																														"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																													}
																												},
																												"required": [
																													"type"
																												],
																												"additionalProperties": false
																											}
																										]
																									}
																								},
																								"required": [
																									"id",
																									"row",
																									"column"
																								],
																								"additionalProperties": false
																							}
																						},
																						"locked": {
																							"type": "boolean"
																						},
																						"sectionStyle": {
																							"type": "object",
																							"properties": {
																								"background": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"MUTED",
																										"TINT",
																										"ACCENT",
																										"DARK"
																									]
																								},
																								"padding": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"SM",
																										"MD",
																										"LG"
																									]
																								},
																								"bleed": {
																									"type": "boolean"
																								},
																								"border": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"visibilityRule": {
																							"type": "object",
																							"properties": {
																								"customFieldId": {
																									"type": "string",
																									"minLength": 1
																								},
																								"equals": {
																									"type": "string"
																								},
																								"mode": {
																									"type": "string",
																									"enum": [
																										"SHOW_WHEN",
																										"HIDE_WHEN"
																									]
																								}
																							},
																							"required": [
																								"customFieldId",
																								"equals",
																								"mode"
																							],
																							"additionalProperties": false
																						},
																						"hidden": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type",
																						"columns",
																						"fields"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"PRODUCT_TABLE"
																							]
																						},
																						"name": {
																							"type": "string"
																						},
																						"enableName": {
																							"type": "boolean"
																						},
																						"columns": {
																							"type": "object",
																							"additionalProperties": {
																								"type": "object",
																								"properties": {
																									"name": {
																										"type": "string"
																									},
																									"originalName": {
																										"type": "string"
																									},
																									"enabled": {
																										"type": "boolean"
																									},
																									"key": {
																										"type": "string"
																									},
																									"settings": {
																										"type": "object",
																										"properties": {
																											"decimalPlaces": {
																												"type": "number"
																											},
																											"oneTimePayment": {
																												"type": "boolean"
																											},
																											"pricePrefix": {
																												"type": "string"
																											},
																											"priceSuffix": {
																												"type": "string"
																											},
																											"pricesIncludeVat": {
																												"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																												"type": "boolean"
																											},
																											"defaultVatRate": {
																												"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																												"type": "number"
																											},
																											"showVatBreakdown": {
																												"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																												"type": "boolean"
																											}
																										},
																										"additionalProperties": false
																									}
																								},
																								"required": [
																									"name",
																									"originalName",
																									"enabled",
																									"key",
																									"settings"
																								],
																								"additionalProperties": false
																							}
																						},
																						"summaryLabels": {
																							"type": "object",
																							"properties": {
																								"subtotal": {
																									"type": "string"
																								},
																								"vat": {
																									"type": "string"
																								},
																								"total": {
																									"type": "string"
																								},
																								"payable": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"subtotal",
																								"vat",
																								"total"
																							],
																							"additionalProperties": false
																						},
																						"allowSelection": {
																							"type": "boolean"
																						},
																						"selectionPartyId": {
																							"type": "string"
																						},
																						"selectionRequired": {
																							"type": "boolean"
																						},
																						"selectedProductIds": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"recipientChoice": {
																							"type": "object",
																							"properties": {
																								"selectedIds": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"quantities": {
																									"type": "object",
																									"additionalProperties": {
																										"type": "number"
																									}
																								}
																							},
																							"required": [
																								"selectedIds",
																								"quantities"
																							],
																							"additionalProperties": false
																						},
																						"payment": {
																							"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																							"type": "object",
																							"properties": {
																								"enabled": {
																									"type": "boolean"
																								},
																								"payerPartyId": {
																									"description": "The party who pays. Without it, `selectionPartyId` pays.",
																									"type": "string"
																								},
																								"basis": {
																									"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																									"type": "string",
																									"enum": [
																										"ONE_TIME",
																										"FIRST_PERIOD"
																									]
																								},
																								"percent": {
																									"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 100
																								}
																							},
																							"required": [
																								"enabled"
																							],
																							"additionalProperties": false
																						},
																						"sections": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"id": {
																										"type": "string"
																									},
																									"name": {
																										"type": "string"
																									},
																									"pickOne": {
																										"type": "boolean"
																									},
																									"showSubtotal": {
																										"type": "boolean"
																									}
																								},
																								"required": [
																									"id",
																									"name"
																								],
																								"additionalProperties": false
																							}
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								},
																								"label": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"pricing": {
																							"type": "object",
																							"properties": {
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"style": {
																							"type": "object",
																							"properties": {
																								"border": {
																									"type": "boolean"
																								},
																								"rounded": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"currency": {
																							"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																							"type": "string",
																							"pattern": "^[A-Z]{3}$"
																						},
																						"language": {
																							"type": "string",
																							"enum": [
																								"sv",
																								"en",
																								"no",
																								"da",
																								"fi",
																								"de",
																								"is",
																								"es",
																								"fr",
																								"it"
																							]
																						},
																						"products": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"id": {
																										"type": "string"
																									},
																									"name": {
																										"type": "string"
																									},
																									"description": {
																										"type": "string"
																									},
																									"price": {
																										"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																										"type": "number"
																									},
																									"unit": {
																										"type": "string"
																									},
																									"quantity": {
																										"type": "number"
																									},
																									"vat": {
																										"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																										"type": "number"
																									},
																									"optional": {
																										"type": "boolean"
																									},
																									"defaultSelected": {
																										"type": "boolean"
																									},
																									"quantityEditable": {
																										"type": "boolean"
																									},
																									"quantityMin": {
																										"type": "number"
																									},
																									"quantityMax": {
																										"type": "number"
																									},
																									"discount": {
																										"type": "object",
																										"properties": {
																											"type": {
																												"type": "string",
																												"enum": [
																													"PERCENT",
																													"AMOUNT"
																												]
																											},
																											"value": {
																												"type": "number"
																											}
																										},
																										"required": [
																											"type",
																											"value"
																										],
																										"additionalProperties": false
																									},
																									"billing": {
																										"type": "string",
																										"enum": [
																											"ONE_TIME",
																											"MONTHLY",
																											"QUARTERLY",
																											"YEARLY"
																										]
																									},
																									"sectionId": {
																										"type": "string"
																									},
																									"sku": {
																										"type": "string"
																									},
																									"productId": {
																										"type": "string"
																									},
																									"productType": {
																										"type": "string",
																										"enum": [
																											"GOODS",
																											"SERVICE",
																											"ROT",
																											"RUT"
																										]
																									}
																								},
																								"required": [
																									"id",
																									"name"
																								],
																								"additionalProperties": false
																							}
																						},
																						"locked": {
																							"type": "boolean"
																						},
																						"sectionStyle": {
																							"type": "object",
																							"properties": {
																								"background": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"MUTED",
																										"TINT",
																										"ACCENT",
																										"DARK"
																									]
																								},
																								"padding": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"SM",
																										"MD",
																										"LG"
																									]
																								},
																								"bleed": {
																									"type": "boolean"
																								},
																								"border": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"visibilityRule": {
																							"type": "object",
																							"properties": {
																								"customFieldId": {
																									"type": "string",
																									"minLength": 1
																								},
																								"equals": {
																									"type": "string"
																								},
																								"mode": {
																									"type": "string",
																									"enum": [
																										"SHOW_WHEN",
																										"HIDE_WHEN"
																									]
																								}
																							},
																							"required": [
																								"customFieldId",
																								"equals",
																								"mode"
																							],
																							"additionalProperties": false
																						},
																						"hidden": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type",
																						"name",
																						"columns",
																						"products"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"TABLE"
																							]
																						},
																						"columns": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"id": {
																										"type": "string"
																									},
																									"name": {
																										"type": "string"
																									},
																									"type": {
																										"type": "string",
																										"enum": [
																											"TEXT",
																											"NUMBER"
																										]
																									}
																								},
																								"required": [
																									"id",
																									"name",
																									"type"
																								],
																								"additionalProperties": false
																							}
																						},
																						"rows": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"id": {
																										"type": "string"
																									},
																									"cells": {
																										"type": "array",
																										"items": {
																											"type": "object",
																											"properties": {
																												"columnId": {
																													"type": "string"
																												},
																												"value": {
																													"type": [
																														"string",
																														"number"
																													]
																												}
																											},
																											"required": [
																												"columnId",
																												"value"
																											],
																											"additionalProperties": false
																										}
																									}
																								},
																								"required": [
																									"id",
																									"cells"
																								],
																								"additionalProperties": false
																							}
																						},
																						"showHeaders": {
																							"type": "boolean"
																						},
																						"style": {
																							"type": "object",
																							"properties": {
																								"border": {
																									"type": "boolean"
																								},
																								"rounded": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"locked": {
																							"type": "boolean"
																						},
																						"sectionStyle": {
																							"type": "object",
																							"properties": {
																								"background": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"MUTED",
																										"TINT",
																										"ACCENT",
																										"DARK"
																									]
																								},
																								"padding": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"SM",
																										"MD",
																										"LG"
																									]
																								},
																								"bleed": {
																									"type": "boolean"
																								},
																								"border": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						},
																						"visibilityRule": {
																							"type": "object",
																							"properties": {
																								"customFieldId": {
																									"type": "string",
																									"minLength": 1
																								},
																								"equals": {
																									"type": "string"
																								},
																								"mode": {
																									"type": "string",
																									"enum": [
																										"SHOW_WHEN",
																										"HIDE_WHEN"
																									]
																								}
																							},
																							"required": [
																								"customFieldId",
																								"equals",
																								"mode"
																							],
																							"additionalProperties": false
																						},
																						"hidden": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type",
																						"columns",
																						"rows"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"SPACER"
																							]
																						},
																						"size": {
																							"type": "string",
																							"enum": [
																								"S",
																								"M",
																								"L",
																								"XL"
																							]
																						},
																						"locked": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"PAGE_BREAK"
																							]
																						},
																						"locked": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"type"
																					],
																					"additionalProperties": false
																				},
																				{
																					"type": "object",
																					"properties": {
																						"type": {
																							"type": "string",
																							"enum": [
																								"DURATION"
																							]
																						},
																						"durationType": {
																							"type": "string",
																							"enum": [
																								"NONE",
																								"SINGLE_PERIOD",
																								"RECURRING",
																								"RECURRING_WITH_INITIAL",
																								"NOT_SET"
																							]
																						},
																						"period": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "integer",
																									"exclusiveMinimum": 0,
																									"maximum": 9007199254740991
																								},
																								"unit": {
																									"type": "string",
																									"enum": [
																										"DAY",
																										"WEEK",
																										"MONTH",
																										"YEAR"
																									]
																								}
																							},
																							"required": [
																								"value",
																								"unit"
																							],
																							"additionalProperties": false
																						},
																						"noticePeriod": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "integer",
																									"exclusiveMinimum": 0,
																									"maximum": 9007199254740991
																								},
																								"unit": {
																									"type": "string",
																									"enum": [
																										"DAY",
																										"WEEK",
																										"MONTH",
																										"YEAR"
																									]
																								}
																							},
																							"required": [
																								"value",
																								"unit"
																							],
																							"additionalProperties": false
																						},
																						"startDate": {
																							"type": "string"
																						},
																						"endDate": {
																							"type": "string"
																						},
																						"locked": {
																							"type": "boolean"
																						},
																						"sectionStyle": {
																							"type": "object",
																							"properties": {
																								"background": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"MUTED",
																										"TINT",
																										"ACCENT",
																										"DARK"
																									]
																								},
																								"padding": {
																									"type": "string",
																									"enum": [
																										"NONE",
																										"SM",
																										"MD",
																										"LG"
																									]
																								},
																								"bleed": {
																									"type": "boolean"
																								},
																								"border": {
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"type"
																					],
																					"additionalProperties": false
																				}
																			]
																		},
																		{
																			"type": "null"
																		}
																	],
																	"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
																},
																"createdAt": {
																	"description": "Date and time when the field was created",
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																},
																"updatedAt": {
																	"description": "Date and time when the field was last updated",
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																}
															},
															"required": [
																"id",
																"documentId",
																"templateId",
																"type",
																"position",
																"fieldMeta",
																"createdAt",
																"updatedAt"
															],
															"additionalProperties": false,
															"example": {
																"id": "cm4k2x9p10009abcd1234efgh",
																"documentId": "cm4k2x9p10003abcd1234efgh",
																"templateId": null,
																"type": "TEXT",
																"position": 0,
																"fieldMeta": {
																	"type": "TEXT",
																	"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
																},
																"createdAt": "2026-09-28T09:12:00.000Z",
																"updatedAt": "2026-09-28T09:12:00.000Z"
															}
														}
													},
													"createdAt": {
														"description": "Date and time when the template was created",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the template was last updated",
														"type": "string",
														"format": "date-time"
													},
													"deletedAt": {
														"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"name",
													"workspaceId",
													"organizationId",
													"createdBy",
													"isGlobal",
													"templateMeta",
													"parties",
													"tags",
													"content",
													"createdAt",
													"updatedAt",
													"deletedAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Paginated list of templates"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10008abcd1234efgh",
											"name": "Anställningsavtal",
											"workspaceId": "cm4k2x9p10001abcd1234efgh",
											"organizationId": "cm4k2x9p10000abcd1234efgh",
											"createdBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"isGlobal": false,
											"templateMeta": {
												"signingMode": "PARALLEL",
												"forceReadFullDocument": false,
												"showChatToSigners": false,
												"language": "sv",
												"value": "540000",
												"signableAfterExpired": false,
												"sendPlainTextEmailOnly": false,
												"allowDelegation": false,
												"reminderIntervalDays": 3,
												"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
												"openVerification": "PIN",
												"internalRecipients": [
													"hr@example.com"
												],
												"visibility": "EVERYONE",
												"selectedUserIds": [
													"cm4k2x9p10008abcd1234efgh"
												],
												"nationalIdDisplayMode": "FULL",
												"sameDeviceSigning": false,
												"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
											},
											"parties": [
												{
													"id": "cm4k2x9p10004abcd1234efgh",
													"templateId": "cm4k2x9p10008abcd1234efgh",
													"name": "Kai Lindqvist",
													"email": "kai@example.com",
													"phone": "+46701740605",
													"type": "INDIVIDUAL",
													"role": "SIGNER",
													"signingOrder": 1,
													"contactId": "cm4k2x9p10006abcd1234efgh",
													"company": null,
													"externalId": "HR-2026-0142",
													"nationalId": "191212121212",
													"country": "SE",
													"signatureMethod": "SE_BANKID",
													"delivery": [
														"EMAIL"
													],
													"signVerification": "PIN",
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:15:00.000Z"
												}
											],
											"tags": [
												{
													"id": "cm4k2x9p10010abcd1234efgh",
													"name": "Anställning",
													"color": "#16A34A"
												}
											],
											"content": [
												{
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											],
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"deletedAt": null
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new template in your workspace.\n\n**Required Fields:**\n- `name` - Template name\n\n**Optional Fields:**\n- `initialContent` - Content blocks to create with the template, each with `type`, `position`, and `fieldMeta`, in the same shape as `POST /api/v1/templates/{id}/content`.\n\n**Usage:** After creating a template, add default parties via `POST /api/v1/templates/:id/parties` and tags via `POST /api/v1/templates/:id/tags`. Then create documents from it using `POST /api/v1/documents` with `templateId`.",
				"summary": "Create a new template",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createTemplate",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"description": "Template name/title"
									},
									"initialContent": {
										"description": "Content blocks to create with the template, each with `type`, `position`, and `fieldMeta`",
										"type": "array",
										"items": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"TEXT",
														"HTML",
														"FORM",
														"PDF",
														"PRODUCT_TABLE",
														"TABLE",
														"SPACER",
														"PAGE_BREAK",
														"DURATION"
													]
												},
												"position": {
													"type": "number"
												},
												"fieldMeta": {
													"oneOf": [
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TEXT"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"HTML"
																	]
																},
																"content": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PDF"
																	]
																},
																"value": {
																	"type": "string"
																},
																"numPages": {
																	"type": "number"
																},
																"pageIndex": {
																	"type": "integer",
																	"minimum": 0,
																	"maximum": 9007199254740991
																},
																"instruction": {
																	"type": "string"
																},
																"formFields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"CHECKBOX",
																					"DROPDOWN",
																					"RADIO"
																				]
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"readOnly": {
																				"type": "boolean"
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"exportValue": {
																				"type": "string"
																			},
																			"unit": {
																				"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																				"type": "string",
																				"enum": [
																					"RELATIVE",
																					"POINTS"
																				]
																			},
																			"origin": {
																				"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																				"type": "string",
																				"enum": [
																					"TOP_LEFT",
																					"BOTTOM_LEFT"
																				]
																			}
																		},
																		"required": [
																			"name",
																			"type",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight"
																		]
																	}
																},
																"formValues": {
																	"type": "object",
																	"additionalProperties": {
																		"type": [
																			"string",
																			"boolean"
																		]
																	}
																},
																"placedFields": {
																	"type": "array",
																	"items": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"inputType": {
																						"type": "string",
																						"enum": [
																							"TEXT",
																							"DATE",
																							"CHECKBOX",
																							"SELECT",
																							"DRAW",
																							"SIGNATURE",
																							"INITIALS"
																						]
																					},
																					"label": {
																						"type": "string"
																					},
																					"fillSource": {
																						"type": "string",
																						"enum": [
																							"SIGNER",
																							"FIXED",
																							"NONE",
																							"VARIABLE"
																						]
																					},
																					"partyId": {
																						"type": "string"
																					},
																					"variableId": {
																						"type": "string"
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"drawn": {
																						"type": "boolean"
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"multiline": {
																						"type": "boolean"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr",
																							"number"
																						]
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind",
																					"inputType"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"id": {
																						"type": "string",
																						"minLength": 1
																					},
																					"page": {
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 9007199254740991,
																						"description": "The page the box is on, counted from 1."
																					},
																					"rect": {
																						"type": "object",
																						"properties": {
																							"x": {
																								"type": "number"
																							},
																							"y": {
																								"type": "number"
																							},
																							"width": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"height": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							}
																						},
																						"required": [
																							"x",
																							"y",
																							"width",
																							"height"
																						],
																						"description": "Position and size of the box, in `unit` from the `origin` corner of the page."
																					},
																					"pageWidth": {
																						"description": "Width of the page in PDF points. Omit to use the width of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageHeight": {
																						"description": "Height of the page in PDF points. Omit to use the height of the PDF page.",
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"pageRotation": {
																						"description": "Rotation of the page in degrees. Omit to use the rotation of the PDF page.",
																						"anyOf": [
																							{
																								"type": "number",
																								"enum": [
																									0
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									90
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									180
																								]
																							},
																							{
																								"type": "number",
																								"enum": [
																									270
																								]
																							}
																						]
																					},
																					"name": {
																						"type": "string"
																					},
																					"key": {
																						"type": "string",
																						"pattern": "^[a-z0-9_-]*$"
																					},
																					"locked": {
																						"type": "boolean"
																					},
																					"style": {
																						"type": "object",
																						"properties": {
																							"fontSize": {
																								"type": "number",
																								"minimum": 6,
																								"maximum": 72
																							},
																							"color": {
																								"type": "string",
																								"pattern": "^#[0-9a-fA-F]{6}$"
																							},
																							"bold": {
																								"type": "boolean"
																							},
																							"italic": {
																								"type": "boolean"
																							},
																							"align": {
																								"type": "string",
																								"enum": [
																									"LEFT",
																									"CENTER",
																									"RIGHT"
																								]
																							}
																						}
																					},
																					"kind": {
																						"type": "string",
																						"enum": [
																							"STATIC"
																						]
																					},
																					"content": {
																						"type": "string"
																					},
																					"text": {
																						"type": "string"
																					},
																					"unit": {
																						"description": "What `rect` is measured in: `RELATIVE` (default), fractions of the page from 0 to 1, or `POINTS`, PDF points.",
																						"type": "string",
																						"enum": [
																							"RELATIVE",
																							"POINTS"
																						]
																					},
																					"origin": {
																						"description": "The page corner `rect.x` and `rect.y` are measured from: `TOP_LEFT` (default) or `BOTTOM_LEFT`, the PDF convention.",
																						"type": "string",
																						"enum": [
																							"TOP_LEFT",
																							"BOTTOM_LEFT"
																						]
																					}
																				},
																				"required": [
																					"id",
																					"page",
																					"rect",
																					"kind"
																				]
																			}
																		],
																		"description": "A box placed on a page of a PDF field"
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"FORM"
																	]
																},
																"columns": {
																	"type": "number",
																	"minimum": 1
																},
																"fields": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"INPUT",
																					"TEXT",
																					"SELECT",
																					"DATEPICKER",
																					"RADIO",
																					"CHECKBOX",
																					"NUMBER",
																					"ATTACHMENT"
																				]
																			},
																			"row": {
																				"type": "number",
																				"minimum": 0
																			},
																			"column": {
																				"type": "number",
																				"minimum": 0
																			},
																			"colSpan": {
																				"type": "integer",
																				"exclusiveMinimum": 0,
																				"maximum": 9007199254740991
																			},
																			"fieldMeta": {
																				"oneOf": [
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"INPUT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"format": {
																								"type": "string",
																								"enum": [
																									"email",
																									"phone",
																									"personnummer",
																									"orgnr"
																								]
																							},
																							"identity": {
																								"type": "string",
																								"enum": [
																									"name",
																									"ssn"
																								]
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"TEXT"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"rows": {
																								"type": "integer",
																								"minimum": 2,
																								"maximum": 20
																							},
																							"maxLength": {
																								"type": "integer",
																								"exclusiveMinimum": 0,
																								"maximum": 10000
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"SELECT"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"defaultValue": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"DATEPICKER"
																								]
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"RADIO"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"value": {
																								"type": "string"
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"CHECKBOX"
																								]
																							},
																							"options": {
																								"type": "array",
																								"items": {
																									"type": "object",
																									"properties": {
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"value"
																									]
																								}
																							},
																							"values": {
																								"type": "array",
																								"items": {
																									"type": "string"
																								}
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"NUMBER"
																								]
																							},
																							"value": {
																								"type": "string"
																							},
																							"min": {
																								"type": "number"
																							},
																							"max": {
																								"type": "number"
																							},
																							"decimals": {
																								"type": "integer",
																								"minimum": 0,
																								"maximum": 6
																							},
																							"step": {
																								"type": "number",
																								"exclusiveMinimum": 0
																							},
																							"unit": {
																								"type": "string",
																								"maxLength": 12
																							}
																						},
																						"required": [
																							"type"
																						]
																					},
																					{
																						"type": "object",
																						"properties": {
																							"label": {
																								"type": "string"
																							},
																							"placeholder": {
																								"type": "string"
																							},
																							"description": {
																								"type": "string"
																							},
																							"partyId": {
																								"type": [
																									"string",
																									"null"
																								]
																							},
																							"required": {
																								"type": "boolean"
																							},
																							"type": {
																								"type": "string",
																								"enum": [
																									"ATTACHMENT"
																								]
																							},
																							"appendixLabel": {
																								"type": "string"
																							},
																							"allowedTypes": {
																								"type": "array",
																								"items": {
																									"type": "string",
																									"enum": [
																										"PDF",
																										"IMAGE"
																									]
																								}
																							},
																							"includeInDocument": {
																								"type": "boolean"
																							},
																							"value": {
																								"type": "object",
																								"properties": {
																									"filename": {
																										"type": "string"
																									},
																									"mimeType": {
																										"type": "string"
																									},
																									"size": {
																										"type": "number",
																										"description": "Size in bytes"
																									}
																								},
																								"required": [
																									"filename",
																									"mimeType",
																									"size"
																								],
																								"additionalProperties": {},
																								"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																							}
																						},
																						"required": [
																							"type"
																						]
																					}
																				]
																			}
																		},
																		"required": [
																			"id",
																			"row",
																			"column"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"fields"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PRODUCT_TABLE"
																	]
																},
																"name": {
																	"type": "string"
																},
																"enableName": {
																	"type": "boolean"
																},
																"columns": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "object",
																		"properties": {
																			"name": {
																				"type": "string"
																			},
																			"originalName": {
																				"type": "string"
																			},
																			"enabled": {
																				"type": "boolean"
																			},
																			"key": {
																				"type": "string"
																			},
																			"settings": {
																				"type": "object",
																				"properties": {
																					"decimalPlaces": {
																						"type": "number"
																					},
																					"oneTimePayment": {
																						"type": "boolean"
																					},
																					"pricePrefix": {
																						"type": "string"
																					},
																					"priceSuffix": {
																						"type": "string"
																					},
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				}
																			}
																		},
																		"required": [
																			"name",
																			"originalName",
																			"enabled",
																			"key",
																			"settings"
																		]
																	}
																},
																"summaryLabels": {
																	"type": "object",
																	"properties": {
																		"subtotal": {
																			"type": "string"
																		},
																		"vat": {
																			"type": "string"
																		},
																		"total": {
																			"type": "string"
																		},
																		"payable": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"subtotal",
																		"vat",
																		"total"
																	]
																},
																"allowSelection": {
																	"type": "boolean"
																},
																"selectionPartyId": {
																	"type": "string"
																},
																"selectionRequired": {
																	"type": "boolean"
																},
																"selectedProductIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"recipientChoice": {
																	"type": "object",
																	"properties": {
																		"selectedIds": {
																			"type": "array",
																			"items": {
																				"type": "string"
																			}
																		},
																		"quantities": {
																			"type": "object",
																			"additionalProperties": {
																				"type": "number"
																			}
																		}
																	},
																	"required": [
																		"selectedIds",
																		"quantities"
																	]
																},
																"payment": {
																	"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																	"type": "object",
																	"properties": {
																		"enabled": {
																			"type": "boolean"
																		},
																		"payerPartyId": {
																			"description": "The party who pays. Without it, `selectionPartyId` pays.",
																			"type": "string"
																		},
																		"basis": {
																			"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																			"type": "string",
																			"enum": [
																				"ONE_TIME",
																				"FIRST_PERIOD"
																			]
																		},
																		"percent": {
																			"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																			"type": "integer",
																			"minimum": 1,
																			"maximum": 100
																		}
																	},
																	"required": [
																		"enabled"
																	]
																},
																"sections": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"pickOne": {
																				"type": "boolean"
																			},
																			"showSubtotal": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"discount": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"PERCENT",
																				"AMOUNT"
																			]
																		},
																		"value": {
																			"type": "number"
																		},
																		"label": {
																			"type": "string"
																		}
																	},
																	"required": [
																		"type",
																		"value"
																	]
																},
																"pricing": {
																	"type": "object",
																	"properties": {
																		"pricesIncludeVat": {
																			"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																			"type": "boolean"
																		},
																		"defaultVatRate": {
																			"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																			"type": "number"
																		},
																		"showVatBreakdown": {
																			"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																			"type": "boolean"
																		}
																	}
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"currency": {
																	"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																	"type": "string",
																	"pattern": "^[A-Z]{3}$"
																},
																"language": {
																	"type": "string",
																	"enum": [
																		"sv",
																		"en",
																		"no",
																		"da",
																		"fi",
																		"de",
																		"is",
																		"es",
																		"fr",
																		"it"
																	]
																},
																"products": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"description": {
																				"type": "string"
																			},
																			"price": {
																				"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																				"type": "number"
																			},
																			"unit": {
																				"type": "string"
																			},
																			"quantity": {
																				"type": "number"
																			},
																			"vat": {
																				"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																				"type": "number"
																			},
																			"optional": {
																				"type": "boolean"
																			},
																			"defaultSelected": {
																				"type": "boolean"
																			},
																			"quantityEditable": {
																				"type": "boolean"
																			},
																			"quantityMin": {
																				"type": "number"
																			},
																			"quantityMax": {
																				"type": "number"
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				]
																			},
																			"billing": {
																				"type": "string",
																				"enum": [
																					"ONE_TIME",
																					"MONTHLY",
																					"QUARTERLY",
																					"YEARLY"
																				]
																			},
																			"sectionId": {
																				"type": "string"
																			},
																			"sku": {
																				"type": "string"
																			},
																			"productId": {
																				"type": "string"
																			},
																			"productType": {
																				"type": "string",
																				"enum": [
																					"GOODS",
																					"SERVICE",
																					"ROT",
																					"RUT"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name"
																		]
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"name",
																"columns",
																"products"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"TABLE"
																	]
																},
																"columns": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"name": {
																				"type": "string"
																			},
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"NUMBER"
																				]
																			}
																		},
																		"required": [
																			"id",
																			"name",
																			"type"
																		]
																	}
																},
																"rows": {
																	"type": "array",
																	"items": {
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string"
																			},
																			"cells": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"columnId": {
																							"type": "string"
																						},
																						"value": {
																							"type": [
																								"string",
																								"number"
																							]
																						}
																					},
																					"required": [
																						"columnId",
																						"value"
																					]
																				}
																			}
																		},
																		"required": [
																			"id",
																			"cells"
																		]
																	}
																},
																"showHeaders": {
																	"type": "boolean"
																},
																"style": {
																	"type": "object",
																	"properties": {
																		"border": {
																			"type": "boolean"
																		},
																		"rounded": {
																			"type": "boolean"
																		}
																	}
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																},
																"visibilityRule": {
																	"type": "object",
																	"properties": {
																		"customFieldId": {
																			"type": "string",
																			"minLength": 1
																		},
																		"equals": {
																			"type": "string"
																		},
																		"mode": {
																			"type": "string",
																			"enum": [
																				"SHOW_WHEN",
																				"HIDE_WHEN"
																			]
																		}
																	},
																	"required": [
																		"customFieldId",
																		"equals",
																		"mode"
																	]
																},
																"hidden": {
																	"type": "boolean"
																}
															},
															"required": [
																"type",
																"columns",
																"rows"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"SPACER"
																	]
																},
																"size": {
																	"type": "string",
																	"enum": [
																		"S",
																		"M",
																		"L",
																		"XL"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PAGE_BREAK"
																	]
																},
																"locked": {
																	"type": "boolean"
																}
															},
															"required": [
																"type"
															]
														},
														{
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"DURATION"
																	]
																},
																"durationType": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SINGLE_PERIOD",
																		"RECURRING",
																		"RECURRING_WITH_INITIAL",
																		"NOT_SET"
																	]
																},
																"period": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"noticePeriod": {
																	"type": "object",
																	"properties": {
																		"value": {
																			"type": "integer",
																			"exclusiveMinimum": 0,
																			"maximum": 9007199254740991
																		},
																		"unit": {
																			"type": "string",
																			"enum": [
																				"DAY",
																				"WEEK",
																				"MONTH",
																				"YEAR"
																			]
																		}
																	},
																	"required": [
																		"value",
																		"unit"
																	]
																},
																"startDate": {
																	"type": "string"
																},
																"endDate": {
																	"type": "string"
																},
																"locked": {
																	"type": "boolean"
																},
																"sectionStyle": {
																	"type": "object",
																	"properties": {
																		"background": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"MUTED",
																				"TINT",
																				"ACCENT",
																				"DARK"
																			]
																		},
																		"padding": {
																			"type": "string",
																			"enum": [
																				"NONE",
																				"SM",
																				"MD",
																				"LG"
																			]
																		},
																		"bleed": {
																			"type": "boolean"
																		},
																		"border": {
																			"type": "boolean"
																		}
																	}
																}
															},
															"required": [
																"type"
															]
														}
													]
												}
											},
											"required": [
												"type",
												"position",
												"fieldMeta"
											]
										}
									}
								},
								"required": [
									"name"
								],
								"description": "Create template request"
							},
							"example": {
								"name": "Anställningsavtal",
								"initialContent": [
									{
										"type": "TEXT",
										"position": 0,
										"fieldMeta": {
											"type": "TEXT",
											"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>",
											"locked": false,
											"sectionStyle": {
												"background": "NONE",
												"padding": "NONE",
												"bleed": false,
												"border": false
											},
											"hidden": false
										}
									}
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template identifier"
										},
										"name": {
											"type": "string",
											"description": "Template name/title"
										},
										"workspaceId": {
											"description": "Workspace ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"organizationId": {
											"description": "Organization ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the template"
										},
										"isGlobal": {
											"type": "boolean",
											"description": "Whether this is a global template"
										},
										"templateMeta": {
											"description": "The settings that documents created from the template start with",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											},
											"description": "The default parties that documents created from the template start with"
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											},
											"description": "Tags applied to this template"
										},
										"content": {
											"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"createdAt": {
											"description": "Date and time when the template was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the template was last updated",
											"type": "string",
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"workspaceId",
										"organizationId",
										"createdBy",
										"isGlobal",
										"templateMeta",
										"parties",
										"tags",
										"content",
										"createdAt",
										"updatedAt",
										"deletedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10008abcd1234efgh",
									"name": "Anställningsavtal",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"isGlobal": false,
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10008abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"deletedAt": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}": {
			"get": {
				"description": "Gets a template with its settings, parties, and tags. To include its content blocks, pass `expand=content`.",
				"summary": "Get a template by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "expand",
						"in": "query",
						"description": "Related data to include in the response, comma-separated or repeated. `content` adds the template's content blocks.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"content"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getTemplate",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template identifier"
										},
										"name": {
											"type": "string",
											"description": "Template name/title"
										},
										"workspaceId": {
											"description": "Workspace ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"organizationId": {
											"description": "Organization ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the template"
										},
										"isGlobal": {
											"type": "boolean",
											"description": "Whether this is a global template"
										},
										"templateMeta": {
											"description": "The settings that documents created from the template start with",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											},
											"description": "The default parties that documents created from the template start with"
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											},
											"description": "Tags applied to this template"
										},
										"content": {
											"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"createdAt": {
											"description": "Date and time when the template was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the template was last updated",
											"type": "string",
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"workspaceId",
										"organizationId",
										"createdBy",
										"isGlobal",
										"templateMeta",
										"parties",
										"tags",
										"content",
										"createdAt",
										"updatedAt",
										"deletedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10008abcd1234efgh",
									"name": "Anställningsavtal",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"isGlobal": false,
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10008abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"deletedAt": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Template not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "template"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:read"
						]
					}
				]
			},
			"patch": {
				"description": "Update template properties.\n\n**Updatable Fields:**\n- `name` - Template name\n- `templateMeta` - Default settings for documents created from this template, such as `signingMode` and `language`\n\nThe response is the template, in the same shape as `GET /api/v1/templates/:id`. A locked template can't be updated: the request fails with an HTTP `409 Conflict` status code and the code `INVALID_STATE`.",
				"summary": "Update a template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateTemplate",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"description": "Template name/title",
										"type": "string",
										"minLength": 1
									},
									"templateMeta": {
										"description": "Template metadata defaults",
										"type": "object",
										"properties": {
											"signingMode": {
												"type": "string",
												"enum": [
													"PARALLEL",
													"SEQUENTIAL"
												]
											},
											"forceReadFullDocument": {
												"type": "boolean"
											},
											"showChatToSigners": {
												"type": "boolean"
											},
											"value": {
												"type": [
													"string",
													"null"
												]
											},
											"signableAfterExpired": {
												"type": "boolean"
											},
											"sendPlainTextEmailOnly": {
												"type": "boolean"
											},
											"allowDelegation": {
												"type": "boolean"
											},
											"responsibleUserId": {
												"type": "string",
												"description": "The user ID."
											},
											"internalRecipients": {
												"description": "Email addresses that receive a copy of the sealed PDF once the document is completed (max 5). Pass an empty array to clear.",
												"maxItems": 5,
												"type": "array",
												"items": {
													"type": "string",
													"format": "email",
													"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
												}
											},
											"visibility": {
												"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
												"type": "string",
												"enum": [
													"EVERYONE",
													"RESPONSIBLE",
													"PERMISSION",
													"USER_SPECIFIC"
												]
											},
											"selectedUserIds": {
												"description": "User IDs granted access when visibility is USER_SPECIFIC",
												"type": "array",
												"items": {
													"type": "string"
												}
											},
											"language": {
												"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
												"type": "string",
												"enum": [
													"sv",
													"en",
													"no",
													"da",
													"fi",
													"de",
													"is",
													"es",
													"fr",
													"it"
												]
											},
											"reminderIntervalDays": {
												"description": "Days between automatic reminders. Pass `0` to turn them off, or null to use the default of 3.",
												"type": [
													"integer",
													"null"
												],
												"minimum": 0,
												"maximum": 9007199254740991
											},
											"openVerification": {
												"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"PIN",
													"SMS",
													"EMAIL",
													"SE_BANKID",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													null
												]
											},
											"nationalIdDisplayMode": {
												"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"FULL",
													"PARTIAL",
													"NONE",
													null
												]
											},
											"sameDeviceSigning": {
												"description": "Whether all parties sign in sequence on one device",
												"type": "boolean"
											},
											"documentCategoryId": {
												"description": "Document category (Dokumenttyp) ID. See GET /api/v1/document-categories.",
												"type": [
													"string",
													"null"
												]
											}
										}
									}
								},
								"description": "Update template request"
							},
							"example": {
								"name": "Anställningsavtal",
								"templateMeta": {
									"signingMode": "PARALLEL",
									"forceReadFullDocument": false,
									"showChatToSigners": false,
									"value": "540000",
									"signableAfterExpired": false,
									"sendPlainTextEmailOnly": false,
									"allowDelegation": false,
									"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
									"internalRecipients": [
										"hr@example.com"
									],
									"visibility": "EVERYONE",
									"selectedUserIds": [
										"cm4k2x9p10008abcd1234efgh"
									],
									"language": "sv",
									"reminderIntervalDays": 3,
									"openVerification": "PIN",
									"nationalIdDisplayMode": "FULL",
									"sameDeviceSigning": false,
									"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template identifier"
										},
										"name": {
											"type": "string",
											"description": "Template name/title"
										},
										"workspaceId": {
											"description": "Workspace ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"organizationId": {
											"description": "Organization ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the template"
										},
										"isGlobal": {
											"type": "boolean",
											"description": "Whether this is a global template"
										},
										"templateMeta": {
											"description": "The settings that documents created from the template start with",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											},
											"description": "The default parties that documents created from the template start with"
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											},
											"description": "Tags applied to this template"
										},
										"content": {
											"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"createdAt": {
											"description": "Date and time when the template was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the template was last updated",
											"type": "string",
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"workspaceId",
										"organizationId",
										"createdBy",
										"isGlobal",
										"templateMeta",
										"parties",
										"tags",
										"content",
										"createdAt",
										"updatedAt",
										"deletedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10008abcd1234efgh",
									"name": "Anställningsavtal",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"isGlobal": false,
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10008abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"deletedAt": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Template not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "template"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			},
			"delete": {
				"description": "Moves a template to the trash, where it's deleted permanently after 90 days. Documents already created from the template don't change. The response is the template with `deletedAt` set. A locked template can't be deleted: the request fails with an HTTP `409 Conflict` status code and the code `INVALID_STATE`.",
				"summary": "Delete a template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteTemplate",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template identifier"
										},
										"name": {
											"type": "string",
											"description": "Template name/title"
										},
										"workspaceId": {
											"description": "Workspace ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"organizationId": {
											"description": "Organization ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the template"
										},
										"isGlobal": {
											"type": "boolean",
											"description": "Whether this is a global template"
										},
										"templateMeta": {
											"description": "The settings that documents created from the template start with",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											},
											"description": "The default parties that documents created from the template start with"
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											},
											"description": "Tags applied to this template"
										},
										"content": {
											"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"createdAt": {
											"description": "Date and time when the template was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the template was last updated",
											"type": "string",
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"workspaceId",
										"organizationId",
										"createdBy",
										"isGlobal",
										"templateMeta",
										"parties",
										"tags",
										"content",
										"createdAt",
										"updatedAt",
										"deletedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10008abcd1234efgh",
									"name": "Anställningsavtal",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"isGlobal": false,
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10008abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"deletedAt": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Template not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "template"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/duplicate": {
			"post": {
				"description": "Creates a copy of a template, with its fields and parties. The response is the copy, in the same shape as `GET /api/v1/templates/:id`.",
				"summary": "Duplicate a template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "duplicateTemplate",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template identifier"
										},
										"name": {
											"type": "string",
											"description": "Template name/title"
										},
										"workspaceId": {
											"description": "Workspace ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"organizationId": {
											"description": "Organization ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the template"
										},
										"isGlobal": {
											"type": "boolean",
											"description": "Whether this is a global template"
										},
										"templateMeta": {
											"description": "The settings that documents created from the template start with",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											},
											"description": "The default parties that documents created from the template start with"
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											},
											"description": "Tags applied to this template"
										},
										"content": {
											"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"createdAt": {
											"description": "Date and time when the template was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the template was last updated",
											"type": "string",
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"workspaceId",
										"organizationId",
										"createdBy",
										"isGlobal",
										"templateMeta",
										"parties",
										"tags",
										"content",
										"createdAt",
										"updatedAt",
										"deletedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10008abcd1234efgh",
									"name": "Anställningsavtal",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"isGlobal": false,
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10008abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"deletedAt": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Template not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "template"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/parties": {
			"get": {
				"description": "Retrieve all default parties configured on a template. These are copied to new documents created from this template unless overridden.",
				"summary": "List all parties for a template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getTemplateParties",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:read"
						]
					}
				]
			},
			"post": {
				"description": "Add a default party/signer to a template. You can either reference an existing contact via `contactId`, or provide `name` with optional email/phone/company details manually.\n\nThese parties are inherited as signers when a document is created from this template (unless overridden).",
				"summary": "Add a party to template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createTemplateParty",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"anyOf": [
									{
										"type": "object",
										"properties": {
											"contactId": {
												"type": "string",
												"minLength": 1,
												"description": "ID of existing contact to add as a party"
											},
											"role": {
												"default": "SIGNER",
												"type": "string",
												"enum": [
													"SIGNER",
													"ORGANIZER",
													"REVIEWER"
												],
												"description": "Party role: SIGNER, ORGANIZER, or REVIEWER."
											},
											"signingOrder": {
												"description": "Order for sequential signing",
												"type": [
													"number",
													"null"
												]
											},
											"delivery": {
												"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
												"type": "array",
												"items": {
													"type": "string",
													"enum": [
														"EMAIL",
														"SMS",
														"IN_APP"
													]
												}
											},
											"signatureMethod": {
												"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. Defaults to the workspace setting.",
												"type": "string",
												"enum": [
													"NONE",
													"DRAWING",
													"SE_BANKID",
													"MANUAL",
													"CLICK_TO_SIGN",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"NO_QES",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													"ZEALID_QES"
												]
											},
											"signVerification": {
												"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"PIN",
													"SMS",
													"EMAIL",
													"SE_BANKID",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													null
												]
											}
										},
										"required": [
											"contactId"
										]
									},
									{
										"type": "object",
										"properties": {
											"name": {
												"type": "string",
												"minLength": 1,
												"description": "Party full name"
											},
											"email": {
												"description": "Party email address",
												"type": "string",
												"format": "email",
												"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
											},
											"phone": {
												"description": "Party phone number",
												"type": "string"
											},
											"role": {
												"default": "SIGNER",
												"type": "string",
												"enum": [
													"SIGNER",
													"ORGANIZER",
													"REVIEWER"
												],
												"description": "Party role: SIGNER, ORGANIZER, or REVIEWER."
											},
											"signingOrder": {
												"description": "Order for sequential signing",
												"type": [
													"number",
													"null"
												]
											},
											"company": {
												"description": "The company the party signs for. Leave it out for a private individual.",
												"type": "object",
												"properties": {
													"id": {
														"description": "ID of a company in your workspace to link",
														"type": "string"
													},
													"name": {
														"description": "Company name",
														"type": "string"
													},
													"orgNumber": {
														"description": "Company organization number",
														"type": "string"
													},
													"role": {
														"description": "The party's role or title at the company, such as CEO or board member",
														"type": "string"
													}
												}
											},
											"externalId": {
												"type": "string"
											},
											"nationalId": {
												"description": "National identity number, such as a Swedish personnummer",
												"type": "string"
											},
											"country": {
												"type": "string",
												"description": "ISO 3166-1 alpha-2 country code of the party, such as SE or DE"
											},
											"delivery": {
												"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
												"type": "array",
												"items": {
													"type": "string",
													"enum": [
														"EMAIL",
														"SMS",
														"IN_APP"
													]
												}
											},
											"signatureMethod": {
												"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. Defaults to the workspace setting.",
												"type": "string",
												"enum": [
													"NONE",
													"DRAWING",
													"SE_BANKID",
													"MANUAL",
													"CLICK_TO_SIGN",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"NO_QES",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													"ZEALID_QES"
												]
											},
											"signVerification": {
												"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
												"type": [
													"string",
													"null"
												],
												"enum": [
													"PIN",
													"SMS",
													"EMAIL",
													"SE_BANKID",
													"NO_BANKID_BIOMETRIC",
													"NO_BANKID_HIGH",
													"DK_MITID",
													"DK_MITID_ERHVERV",
													"FI_FTN",
													"NL_IDIN",
													null
												]
											}
										},
										"required": [
											"name"
										]
									}
								],
								"description": "Create template party request"
							},
							"example": {
								"contactId": "cm4k2x9p10006abcd1234efgh",
								"role": "SIGNER",
								"signingOrder": 1,
								"delivery": [
									"EMAIL"
								],
								"signatureMethod": "SE_BANKID",
								"signVerification": "PIN"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template party identifier"
										},
										"templateId": {
											"type": "string",
											"description": "Template ID this party belongs to"
										},
										"name": {
											"type": "string",
											"description": "Party name"
										},
										"email": {
											"description": "Party email address",
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"description": "Party phone number",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"INDIVIDUAL",
												"COMPANY"
											],
											"description": "Party type: INDIVIDUAL or COMPANY"
										},
										"role": {
											"type": "string",
											"enum": [
												"SIGNER",
												"ORGANIZER",
												"REVIEWER"
											],
											"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
										},
										"signingOrder": {
											"description": "Order for sequential signing",
											"type": [
												"number",
												"null"
											]
										},
										"contactId": {
											"description": "Linked contact ID",
											"type": [
												"string",
												"null"
											]
										},
										"company": {
											"description": "The company the party signs for, or null for a private individual",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"description": "ID of the linked company in your workspace",
													"type": [
														"string",
														"null"
													]
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Company organization number",
													"type": [
														"string",
														"null"
													]
												},
												"role": {
													"description": "The party's role or title at the company",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"role"
											],
											"additionalProperties": false
										},
										"externalId": {
											"description": "External reference ID",
											"type": [
												"string",
												"null"
											]
										},
										"nationalId": {
											"description": "National identity number, such as a Swedish personnummer",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
											"type": [
												"string",
												"null"
											]
										},
										"signatureMethod": {
											"description": "Default signature method",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NONE",
												"DRAWING",
												"SE_BANKID",
												"MANUAL",
												"CLICK_TO_SIGN",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"delivery": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"EMAIL",
													"SMS",
													"IN_APP"
												]
											},
											"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
										},
										"signVerification": {
											"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"createdAt": {
											"description": "When the party was added to the template",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "When the party was last changed",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"templateId",
										"name",
										"email",
										"phone",
										"type",
										"role",
										"signingOrder",
										"contactId",
										"company",
										"externalId",
										"nationalId",
										"country",
										"signatureMethod",
										"delivery",
										"signVerification",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"name": "Kai Lindqvist",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"type": "INDIVIDUAL",
									"role": "SIGNER",
									"signingOrder": 1,
									"contactId": "cm4k2x9p10006abcd1234efgh",
									"company": null,
									"externalId": "HR-2026-0142",
									"nationalId": "191212121212",
									"country": "SE",
									"signatureMethod": "SE_BANKID",
									"delivery": [
										"EMAIL"
									],
									"signVerification": "PIN",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/parties/{partyId}": {
			"patch": {
				"description": "Updates a template party. A property you leave out stays unchanged, and `null` clears it. A locked template can't be changed: the request fails with an HTTP `409 Conflict` status code and the code `INVALID_STATE`.",
				"summary": "Update a template party",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "partyId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The party ID.",
						"example": "cm4k2x9p10004abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateTemplateParty",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string"
									},
									"email": {
										"type": [
											"string",
											"null"
										],
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
									},
									"phone": {
										"type": [
											"string",
											"null"
										]
									},
									"company": {
										"description": "The company the party signs for. A key you leave out keeps its value. Pass null to clear every company field.",
										"type": [
											"object",
											"null"
										],
										"properties": {
											"id": {
												"description": "ID of a company in your workspace to link. Pass null to unlink it.",
												"type": [
													"string",
													"null"
												]
											},
											"name": {
												"description": "Company name. Pass null to clear it.",
												"type": [
													"string",
													"null"
												]
											},
											"orgNumber": {
												"description": "Company organization number. Pass null to clear it.",
												"type": [
													"string",
													"null"
												]
											},
											"role": {
												"description": "The party's role or title at the company. Pass null to clear it.",
												"type": [
													"string",
													"null"
												]
											}
										}
									},
									"externalId": {
										"type": [
											"string",
											"null"
										]
									},
									"nationalId": {
										"description": "National identity number, such as a Swedish personnummer",
										"type": [
											"string",
											"null"
										]
									},
									"country": {
										"type": [
											"string",
											"null"
										],
										"description": "ISO 3166-1 alpha-2 country code of the party, such as SE or DE"
									},
									"role": {
										"type": "string",
										"enum": [
											"SIGNER",
											"ORGANIZER",
											"REVIEWER"
										],
										"description": "Party role: SIGNER, ORGANIZER, or REVIEWER."
									},
									"signingOrder": {
										"type": [
											"number",
											"null"
										]
									},
									"delivery": {
										"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail.",
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"EMAIL",
												"SMS",
												"IN_APP"
											]
										}
									},
									"signatureMethod": {
										"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID. Call `GET /api/v1/helpers/signature-methods` for the methods your account can use. Defaults to the workspace setting.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"NONE",
											"DRAWING",
											"SE_BANKID",
											"MANUAL",
											"CLICK_TO_SIGN",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"NO_QES",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											"ZEALID_QES",
											null
										]
									},
									"signVerification": {
										"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
										"type": [
											"string",
											"null"
										],
										"enum": [
											"PIN",
											"SMS",
											"EMAIL",
											"SE_BANKID",
											"NO_BANKID_BIOMETRIC",
											"NO_BANKID_HIGH",
											"DK_MITID",
											"DK_MITID_ERHVERV",
											"FI_FTN",
											"NL_IDIN",
											null
										]
									}
								},
								"description": "Update template party request. A property you leave out stays unchanged, and `null` clears it."
							},
							"example": {
								"name": "Den anställde",
								"signatureMethod": "SE_BANKID"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template party identifier"
										},
										"templateId": {
											"type": "string",
											"description": "Template ID this party belongs to"
										},
										"name": {
											"type": "string",
											"description": "Party name"
										},
										"email": {
											"description": "Party email address",
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"description": "Party phone number",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"type": "string",
											"enum": [
												"INDIVIDUAL",
												"COMPANY"
											],
											"description": "Party type: INDIVIDUAL or COMPANY"
										},
										"role": {
											"type": "string",
											"enum": [
												"SIGNER",
												"ORGANIZER",
												"REVIEWER"
											],
											"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
										},
										"signingOrder": {
											"description": "Order for sequential signing",
											"type": [
												"number",
												"null"
											]
										},
										"contactId": {
											"description": "Linked contact ID",
											"type": [
												"string",
												"null"
											]
										},
										"company": {
											"description": "The company the party signs for, or null for a private individual",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"description": "ID of the linked company in your workspace",
													"type": [
														"string",
														"null"
													]
												},
												"name": {
													"description": "Company name",
													"type": [
														"string",
														"null"
													]
												},
												"orgNumber": {
													"description": "Company organization number",
													"type": [
														"string",
														"null"
													]
												},
												"role": {
													"description": "The party's role or title at the company",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"orgNumber",
												"role"
											],
											"additionalProperties": false
										},
										"externalId": {
											"description": "External reference ID",
											"type": [
												"string",
												"null"
											]
										},
										"nationalId": {
											"description": "National identity number, such as a Swedish personnummer",
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
											"type": [
												"string",
												"null"
											]
										},
										"signatureMethod": {
											"description": "Default signature method",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"NONE",
												"DRAWING",
												"SE_BANKID",
												"MANUAL",
												"CLICK_TO_SIGN",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"NO_QES",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												"ZEALID_QES",
												null
											]
										},
										"delivery": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"EMAIL",
													"SMS",
													"IN_APP"
												]
											},
											"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
										},
										"signVerification": {
											"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"PIN",
												"SMS",
												"EMAIL",
												"SE_BANKID",
												"NO_BANKID_BIOMETRIC",
												"NO_BANKID_HIGH",
												"DK_MITID",
												"DK_MITID_ERHVERV",
												"FI_FTN",
												"NL_IDIN",
												null
											]
										},
										"createdAt": {
											"description": "When the party was added to the template",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "When the party was last changed",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"templateId",
										"name",
										"email",
										"phone",
										"type",
										"role",
										"signingOrder",
										"contactId",
										"company",
										"externalId",
										"nationalId",
										"country",
										"signatureMethod",
										"delivery",
										"signVerification",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"templateId": "cm4k2x9p10008abcd1234efgh",
									"name": "Kai Lindqvist",
									"email": "kai@example.com",
									"phone": "+46701740605",
									"type": "INDIVIDUAL",
									"role": "SIGNER",
									"signingOrder": 1,
									"contactId": "cm4k2x9p10006abcd1234efgh",
									"company": null,
									"externalId": "HR-2026-0142",
									"nationalId": "191212121212",
									"country": "SE",
									"signatureMethod": "SE_BANKID",
									"delivery": [
										"EMAIL"
									],
									"signVerification": "PIN",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			},
			"delete": {
				"description": "Removes a default party from a template. The response holds the ID of the removed party.",
				"summary": "Remove a party from template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "partyId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The party ID.",
						"example": "cm4k2x9p10004abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteTemplateParty",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted party"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the party is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10004abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Party not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "party"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/tags": {
			"post": {
				"description": "Associate a tag with a template. Tag must be configured for TEMPLATE use (`availableFor` includes `TEMPLATE`). The response is the template.",
				"summary": "Add tag to template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "addTagToTemplate",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"tagId": {
										"type": "string",
										"minLength": 1,
										"description": "The tag ID."
									}
								},
								"required": [
									"tagId"
								]
							},
							"example": {
								"tagId": "cm4k2x9p10010abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template identifier"
										},
										"name": {
											"type": "string",
											"description": "Template name/title"
										},
										"workspaceId": {
											"description": "Workspace ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"organizationId": {
											"description": "Organization ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the template"
										},
										"isGlobal": {
											"type": "boolean",
											"description": "Whether this is a global template"
										},
										"templateMeta": {
											"description": "The settings that documents created from the template start with",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											},
											"description": "The default parties that documents created from the template start with"
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											},
											"description": "Tags applied to this template"
										},
										"content": {
											"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"createdAt": {
											"description": "Date and time when the template was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the template was last updated",
											"type": "string",
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"workspaceId",
										"organizationId",
										"createdBy",
										"isGlobal",
										"templateMeta",
										"parties",
										"tags",
										"content",
										"createdAt",
										"updatedAt",
										"deletedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10010abcd1234efgh",
									"name": "Anställning",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"isGlobal": false,
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10010abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"deletedAt": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "tagId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Tag not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "tag"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/templates/{id}/tags/{tagId}": {
			"delete": {
				"description": "Remove a tag association from a template. The response is the template.",
				"summary": "Remove tag from template",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The template ID.",
						"example": "cm4k2x9p10008abcd1234efgh"
					},
					{
						"name": "tagId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The tag ID.",
						"example": "cm4k2x9p10010abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "removeTagFromTemplate",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique template identifier"
										},
										"name": {
											"type": "string",
											"description": "Template name/title"
										},
										"workspaceId": {
											"description": "Workspace ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"organizationId": {
											"description": "Organization ID this template belongs to",
											"type": [
												"string",
												"null"
											]
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the template"
										},
										"isGlobal": {
											"type": "boolean",
											"description": "Whether this is a global template"
										},
										"templateMeta": {
											"description": "The settings that documents created from the template start with",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"signingMode": {
													"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PARALLEL",
														"SEQUENTIAL",
														null
													]
												},
												"forceReadFullDocument": {
													"description": "Whether signers must read the entire document before signing",
													"type": [
														"boolean",
														"null"
													]
												},
												"showChatToSigners": {
													"description": "Whether to show document chat to signers",
													"type": [
														"boolean",
														"null"
													]
												},
												"language": {
													"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"sv",
														"en",
														"no",
														"da",
														"fi",
														"de",
														"is",
														"es",
														"fr",
														"it",
														null
													]
												},
												"value": {
													"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
													"type": [
														"string",
														"null"
													]
												},
												"signableAfterExpired": {
													"description": "Whether documents created from this template remain signable after expiration",
													"type": [
														"boolean",
														"null"
													]
												},
												"sendPlainTextEmailOnly": {
													"description": "Send plain text email invitations only (no HTML)",
													"type": [
														"boolean",
														"null"
													]
												},
												"allowDelegation": {
													"description": "Whether signers may delegate signing to another person",
													"type": [
														"boolean",
														"null"
													]
												},
												"reminderIntervalDays": {
													"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
													"type": [
														"integer",
														"null"
													],
													"minimum": -9007199254740991,
													"maximum": 9007199254740991
												},
												"responsibleUserId": {
													"description": "Default responsible user ID",
													"type": [
														"string",
														"null"
													]
												},
												"openVerification": {
													"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"PIN",
														"SMS",
														"EMAIL",
														"SE_BANKID",
														"NO_BANKID_BIOMETRIC",
														"NO_BANKID_HIGH",
														"DK_MITID",
														"DK_MITID_ERHVERV",
														"FI_FTN",
														"NL_IDIN",
														null
													]
												},
												"internalRecipients": {
													"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"visibility": {
													"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"EVERYONE",
														"RESPONSIBLE",
														"PERMISSION",
														"USER_SPECIFIC",
														null
													]
												},
												"selectedUserIds": {
													"description": "User IDs granted access when visibility is USER_SPECIFIC",
													"type": [
														"array",
														"null"
													],
													"items": {
														"type": "string"
													}
												},
												"nationalIdDisplayMode": {
													"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
													"type": [
														"string",
														"null"
													],
													"enum": [
														"FULL",
														"PARTIAL",
														"NONE",
														null
													]
												},
												"sameDeviceSigning": {
													"description": "Whether all parties sign in sequence on one device",
													"type": [
														"boolean",
														"null"
													]
												},
												"documentCategoryId": {
													"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"signingMode",
												"forceReadFullDocument",
												"showChatToSigners",
												"language",
												"value",
												"signableAfterExpired",
												"sendPlainTextEmailOnly",
												"allowDelegation",
												"reminderIntervalDays",
												"responsibleUserId",
												"openVerification",
												"internalRecipients",
												"visibility",
												"selectedUserIds",
												"nationalIdDisplayMode",
												"sameDeviceSigning",
												"documentCategoryId"
											],
											"additionalProperties": false
										},
										"parties": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique template party identifier"
													},
													"templateId": {
														"type": "string",
														"description": "Template ID this party belongs to"
													},
													"name": {
														"type": "string",
														"description": "Party name"
													},
													"email": {
														"description": "Party email address",
														"type": [
															"string",
															"null"
														]
													},
													"phone": {
														"description": "Party phone number",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"INDIVIDUAL",
															"COMPANY"
														],
														"description": "Party type: INDIVIDUAL or COMPANY"
													},
													"role": {
														"type": "string",
														"enum": [
															"SIGNER",
															"ORGANIZER",
															"REVIEWER"
														],
														"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
													},
													"signingOrder": {
														"description": "Order for sequential signing",
														"type": [
															"number",
															"null"
														]
													},
													"contactId": {
														"description": "Linked contact ID",
														"type": [
															"string",
															"null"
														]
													},
													"company": {
														"description": "The company the party signs for, or null for a private individual",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"description": "ID of the linked company in your workspace",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"description": "Company name",
																"type": [
																	"string",
																	"null"
																]
															},
															"orgNumber": {
																"description": "Company organization number",
																"type": [
																	"string",
																	"null"
																]
															},
															"role": {
																"description": "The party's role or title at the company",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"orgNumber",
															"role"
														],
														"additionalProperties": false
													},
													"externalId": {
														"description": "External reference ID",
														"type": [
															"string",
															"null"
														]
													},
													"nationalId": {
														"description": "National identity number, such as a Swedish personnummer",
														"type": [
															"string",
															"null"
														]
													},
													"country": {
														"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
														"type": [
															"string",
															"null"
														]
													},
													"signatureMethod": {
														"description": "Default signature method",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"NONE",
															"DRAWING",
															"SE_BANKID",
															"MANUAL",
															"CLICK_TO_SIGN",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"NO_QES",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															"ZEALID_QES",
															null
														]
													},
													"delivery": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"EMAIL",
																"SMS",
																"IN_APP"
															]
														},
														"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
													},
													"signVerification": {
														"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"PIN",
															"SMS",
															"EMAIL",
															"SE_BANKID",
															"NO_BANKID_BIOMETRIC",
															"NO_BANKID_HIGH",
															"DK_MITID",
															"DK_MITID_ERHVERV",
															"FI_FTN",
															"NL_IDIN",
															null
														]
													},
													"createdAt": {
														"description": "When the party was added to the template",
														"type": "string",
														"format": "date-time"
													},
													"updatedAt": {
														"description": "When the party was last changed",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"templateId",
													"name",
													"email",
													"phone",
													"type",
													"role",
													"signingOrder",
													"contactId",
													"company",
													"externalId",
													"nationalId",
													"country",
													"signatureMethod",
													"delivery",
													"signVerification",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false
											},
											"description": "The default parties that documents created from the template start with"
										},
										"tags": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The tag ID."
													},
													"name": {
														"type": "string"
													},
													"color": {
														"type": "string"
													}
												},
												"required": [
													"id",
													"name",
													"color"
												],
												"additionalProperties": false
											},
											"description": "Tags applied to this template"
										},
										"content": {
											"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
											"type": [
												"array",
												"null"
											],
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique field identifier"
													},
													"documentId": {
														"description": "Document this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"templateId": {
														"description": "Template this field belongs to",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"type": "string",
														"enum": [
															"TEXT",
															"HTML",
															"FORM",
															"PDF",
															"PRODUCT_TABLE",
															"TABLE",
															"SPACER",
															"PAGE_BREAK",
															"DURATION"
														],
														"description": "Field type"
													},
													"position": {
														"type": "number",
														"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
													},
													"fieldMeta": {
														"anyOf": [
															{
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TEXT"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"HTML"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PDF"
																				]
																			},
																			"value": {
																				"type": "string"
																			},
																			"numPages": {
																				"type": "number"
																			},
																			"pageIndex": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 9007199254740991
																			},
																			"instruction": {
																				"type": "string"
																			},
																			"formFields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"CHECKBOX",
																								"DROPDOWN",
																								"RADIO"
																							]
																						},
																						"page": {
																							"type": "integer",
																							"minimum": 1,
																							"maximum": 9007199254740991,
																							"description": "The page the box is on, counted from 1."
																						},
																						"rect": {
																							"type": "object",
																							"properties": {
																								"x": {
																									"type": "number"
																								},
																								"y": {
																									"type": "number"
																								},
																								"width": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"height": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"x",
																								"y",
																								"width",
																								"height"
																							],
																							"additionalProperties": false,
																							"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																						},
																						"pageWidth": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageHeight": {
																							"type": "number",
																							"exclusiveMinimum": 0
																						},
																						"pageRotation": {
																							"anyOf": [
																								{
																									"type": "number",
																									"enum": [
																										0
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										90
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										180
																									]
																								},
																								{
																									"type": "number",
																									"enum": [
																										270
																									]
																								}
																							]
																						},
																						"options": {
																							"type": "array",
																							"items": {
																								"type": "string"
																							}
																						},
																						"required": {
																							"type": "boolean"
																						},
																						"readOnly": {
																							"type": "boolean"
																						},
																						"multiline": {
																							"type": "boolean"
																						},
																						"exportValue": {
																							"type": "string"
																						}
																					},
																					"required": [
																						"name",
																						"type",
																						"page",
																						"rect",
																						"pageWidth",
																						"pageHeight"
																					],
																					"additionalProperties": {}
																				}
																			},
																			"formValues": {
																				"type": "object",
																				"additionalProperties": {
																					"type": [
																						"string",
																						"boolean"
																					]
																				}
																			},
																			"placedFields": {
																				"type": "array",
																				"items": {
																					"oneOf": [
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"INPUT"
																									]
																								},
																								"inputType": {
																									"type": "string",
																									"enum": [
																										"TEXT",
																										"DATE",
																										"CHECKBOX",
																										"SELECT",
																										"DRAW",
																										"SIGNATURE",
																										"INITIALS"
																									]
																								},
																								"label": {
																									"type": "string"
																								},
																								"fillSource": {
																									"type": "string",
																									"enum": [
																										"SIGNER",
																										"FIXED",
																										"NONE",
																										"VARIABLE"
																									]
																								},
																								"partyId": {
																									"type": "string"
																								},
																								"variableId": {
																									"type": "string"
																								},
																								"identity": {
																									"type": "string",
																									"enum": [
																										"name",
																										"ssn"
																									]
																								},
																								"drawn": {
																									"type": "boolean"
																								},
																								"required": {
																									"type": "boolean"
																								},
																								"options": {
																									"type": "array",
																									"items": {
																										"type": "string"
																									}
																								},
																								"multiline": {
																									"type": "boolean"
																								},
																								"format": {
																									"type": "string",
																									"enum": [
																										"email",
																										"phone",
																										"personnummer",
																										"orgnr",
																										"number"
																									]
																								},
																								"min": {
																									"type": "number"
																								},
																								"max": {
																									"type": "number"
																								},
																								"decimals": {
																									"type": "integer",
																									"minimum": 0,
																									"maximum": 6
																								},
																								"step": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind",
																								"inputType"
																							],
																							"additionalProperties": {}
																						},
																						{
																							"type": "object",
																							"properties": {
																								"id": {
																									"type": "string",
																									"minLength": 1
																								},
																								"page": {
																									"type": "integer",
																									"minimum": 1,
																									"maximum": 9007199254740991,
																									"description": "The page the box is on, counted from 1."
																								},
																								"rect": {
																									"type": "object",
																									"properties": {
																										"x": {
																											"type": "number"
																										},
																										"y": {
																											"type": "number"
																										},
																										"width": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"height": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										}
																									},
																									"required": [
																										"x",
																										"y",
																										"width",
																										"height"
																									],
																									"additionalProperties": false,
																									"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																								},
																								"pageWidth": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageHeight": {
																									"type": "number",
																									"exclusiveMinimum": 0
																								},
																								"pageRotation": {
																									"anyOf": [
																										{
																											"type": "number",
																											"enum": [
																												0
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												90
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												180
																											]
																										},
																										{
																											"type": "number",
																											"enum": [
																												270
																											]
																										}
																									]
																								},
																								"name": {
																									"type": "string"
																								},
																								"key": {
																									"type": "string",
																									"pattern": "^[a-z0-9_-]*$"
																								},
																								"locked": {
																									"type": "boolean"
																								},
																								"style": {
																									"type": "object",
																									"properties": {
																										"fontSize": {
																											"type": "number",
																											"minimum": 6,
																											"maximum": 72
																										},
																										"color": {
																											"type": "string",
																											"pattern": "^#[0-9a-fA-F]{6}$"
																										},
																										"bold": {
																											"type": "boolean"
																										},
																										"italic": {
																											"type": "boolean"
																										},
																										"align": {
																											"type": "string",
																											"enum": [
																												"LEFT",
																												"CENTER",
																												"RIGHT"
																											]
																										}
																									},
																									"additionalProperties": false
																								},
																								"kind": {
																									"type": "string",
																									"enum": [
																										"STATIC"
																									]
																								},
																								"content": {
																									"type": "string"
																								},
																								"text": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"id",
																								"page",
																								"rect",
																								"pageWidth",
																								"pageHeight",
																								"kind"
																							],
																							"additionalProperties": {}
																						}
																					]
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"FORM"
																				]
																			},
																			"columns": {
																				"type": "number",
																				"minimum": 1
																			},
																			"fields": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string",
																							"minLength": 1
																						},
																						"key": {
																							"type": "string",
																							"pattern": "^[a-z0-9_-]*$"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"INPUT",
																								"TEXT",
																								"SELECT",
																								"DATEPICKER",
																								"RADIO",
																								"CHECKBOX",
																								"NUMBER",
																								"ATTACHMENT"
																							]
																						},
																						"row": {
																							"type": "number",
																							"minimum": 0
																						},
																						"column": {
																							"type": "number",
																							"minimum": 0
																						},
																						"colSpan": {
																							"type": "integer",
																							"exclusiveMinimum": 0,
																							"maximum": 9007199254740991
																						},
																						"fieldMeta": {
																							"oneOf": [
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"INPUT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"format": {
																											"type": "string",
																											"enum": [
																												"email",
																												"phone",
																												"personnummer",
																												"orgnr"
																											]
																										},
																										"identity": {
																											"type": "string",
																											"enum": [
																												"name",
																												"ssn"
																											]
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"TEXT"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"rows": {
																											"type": "integer",
																											"minimum": 2,
																											"maximum": 20
																										},
																										"maxLength": {
																											"type": "integer",
																											"exclusiveMinimum": 0,
																											"maximum": 10000
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"SELECT"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"defaultValue": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"DATEPICKER"
																											]
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"RADIO"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"value": {
																											"type": "string"
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"CHECKBOX"
																											]
																										},
																										"options": {
																											"type": "array",
																											"items": {
																												"type": "object",
																												"properties": {
																													"value": {
																														"type": "string"
																													}
																												},
																												"required": [
																													"value"
																												],
																												"additionalProperties": false
																											}
																										},
																										"values": {
																											"type": "array",
																											"items": {
																												"type": "string"
																											}
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"NUMBER"
																											]
																										},
																										"value": {
																											"type": "string"
																										},
																										"min": {
																											"type": "number"
																										},
																										"max": {
																											"type": "number"
																										},
																										"decimals": {
																											"type": "integer",
																											"minimum": 0,
																											"maximum": 6
																										},
																										"step": {
																											"type": "number",
																											"exclusiveMinimum": 0
																										},
																										"unit": {
																											"type": "string",
																											"maxLength": 12
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								},
																								{
																									"type": "object",
																									"properties": {
																										"label": {
																											"type": "string"
																										},
																										"placeholder": {
																											"type": "string"
																										},
																										"description": {
																											"type": "string"
																										},
																										"partyId": {
																											"type": [
																												"string",
																												"null"
																											]
																										},
																										"required": {
																											"type": "boolean"
																										},
																										"type": {
																											"type": "string",
																											"enum": [
																												"ATTACHMENT"
																											]
																										},
																										"appendixLabel": {
																											"type": "string"
																										},
																										"allowedTypes": {
																											"type": "array",
																											"items": {
																												"type": "string",
																												"enum": [
																													"PDF",
																													"IMAGE"
																												]
																											}
																										},
																										"includeInDocument": {
																											"type": "boolean"
																										},
																										"value": {
																											"type": "object",
																											"properties": {
																												"filename": {
																													"type": "string"
																												},
																												"mimeType": {
																													"type": "string"
																												},
																												"size": {
																													"type": "number",
																													"description": "Size in bytes"
																												}
																											},
																											"required": [
																												"filename",
																												"mimeType",
																												"size"
																											],
																											"additionalProperties": {},
																											"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																										}
																									},
																									"required": [
																										"type"
																									],
																									"additionalProperties": false
																								}
																							]
																						}
																					},
																					"required": [
																						"id",
																						"row",
																						"column"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"fields"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PRODUCT_TABLE"
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"enableName": {
																				"type": "boolean"
																			},
																			"columns": {
																				"type": "object",
																				"additionalProperties": {
																					"type": "object",
																					"properties": {
																						"name": {
																							"type": "string"
																						},
																						"originalName": {
																							"type": "string"
																						},
																						"enabled": {
																							"type": "boolean"
																						},
																						"key": {
																							"type": "string"
																						},
																						"settings": {
																							"type": "object",
																							"properties": {
																								"decimalPlaces": {
																									"type": "number"
																								},
																								"oneTimePayment": {
																									"type": "boolean"
																								},
																								"pricePrefix": {
																									"type": "string"
																								},
																								"priceSuffix": {
																									"type": "string"
																								},
																								"pricesIncludeVat": {
																									"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																									"type": "boolean"
																								},
																								"defaultVatRate": {
																									"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																									"type": "number"
																								},
																								"showVatBreakdown": {
																									"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																									"type": "boolean"
																								}
																							},
																							"additionalProperties": false
																						}
																					},
																					"required": [
																						"name",
																						"originalName",
																						"enabled",
																						"key",
																						"settings"
																					],
																					"additionalProperties": false
																				}
																			},
																			"summaryLabels": {
																				"type": "object",
																				"properties": {
																					"subtotal": {
																						"type": "string"
																					},
																					"vat": {
																						"type": "string"
																					},
																					"total": {
																						"type": "string"
																					},
																					"payable": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"subtotal",
																					"vat",
																					"total"
																				],
																				"additionalProperties": false
																			},
																			"allowSelection": {
																				"type": "boolean"
																			},
																			"selectionPartyId": {
																				"type": "string"
																			},
																			"selectionRequired": {
																				"type": "boolean"
																			},
																			"selectedProductIds": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"recipientChoice": {
																				"type": "object",
																				"properties": {
																					"selectedIds": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					},
																					"quantities": {
																						"type": "object",
																						"additionalProperties": {
																							"type": "number"
																						}
																					}
																				},
																				"required": [
																					"selectedIds",
																					"quantities"
																				],
																				"additionalProperties": false
																			},
																			"payment": {
																				"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
																				"type": "object",
																				"properties": {
																					"enabled": {
																						"type": "boolean"
																					},
																					"payerPartyId": {
																						"description": "The party who pays. Without it, `selectionPartyId` pays.",
																						"type": "string"
																					},
																					"basis": {
																						"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																						"type": "string",
																						"enum": [
																							"ONE_TIME",
																							"FIRST_PERIOD"
																						]
																					},
																					"percent": {
																						"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																						"type": "integer",
																						"minimum": 1,
																						"maximum": 100
																					}
																				},
																				"required": [
																					"enabled"
																				],
																				"additionalProperties": false
																			},
																			"sections": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"pickOne": {
																							"type": "boolean"
																						},
																						"showSubtotal": {
																							"type": "boolean"
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"discount": {
																				"type": "object",
																				"properties": {
																					"type": {
																						"type": "string",
																						"enum": [
																							"PERCENT",
																							"AMOUNT"
																						]
																					},
																					"value": {
																						"type": "number"
																					},
																					"label": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type",
																					"value"
																				],
																				"additionalProperties": false
																			},
																			"pricing": {
																				"type": "object",
																				"properties": {
																					"pricesIncludeVat": {
																						"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																						"type": "boolean"
																					},
																					"defaultVatRate": {
																						"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																						"type": "number"
																					},
																					"showVatBreakdown": {
																						"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"currency": {
																				"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
																				"type": "string",
																				"pattern": "^[A-Z]{3}$"
																			},
																			"language": {
																				"type": "string",
																				"enum": [
																					"sv",
																					"en",
																					"no",
																					"da",
																					"fi",
																					"de",
																					"is",
																					"es",
																					"fr",
																					"it"
																				]
																			},
																			"products": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"description": {
																							"type": "string"
																						},
																						"price": {
																							"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																							"type": "number"
																						},
																						"unit": {
																							"type": "string"
																						},
																						"quantity": {
																							"type": "number"
																						},
																						"vat": {
																							"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																							"type": "number"
																						},
																						"optional": {
																							"type": "boolean"
																						},
																						"defaultSelected": {
																							"type": "boolean"
																						},
																						"quantityEditable": {
																							"type": "boolean"
																						},
																						"quantityMin": {
																							"type": "number"
																						},
																						"quantityMax": {
																							"type": "number"
																						},
																						"discount": {
																							"type": "object",
																							"properties": {
																								"type": {
																									"type": "string",
																									"enum": [
																										"PERCENT",
																										"AMOUNT"
																									]
																								},
																								"value": {
																									"type": "number"
																								}
																							},
																							"required": [
																								"type",
																								"value"
																							],
																							"additionalProperties": false
																						},
																						"billing": {
																							"type": "string",
																							"enum": [
																								"ONE_TIME",
																								"MONTHLY",
																								"QUARTERLY",
																								"YEARLY"
																							]
																						},
																						"sectionId": {
																							"type": "string"
																						},
																						"sku": {
																							"type": "string"
																						},
																						"productId": {
																							"type": "string"
																						},
																						"productType": {
																							"type": "string",
																							"enum": [
																								"GOODS",
																								"SERVICE",
																								"ROT",
																								"RUT"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name"
																					],
																					"additionalProperties": false
																				}
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"name",
																			"columns",
																			"products"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"TABLE"
																				]
																			},
																			"columns": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"name": {
																							"type": "string"
																						},
																						"type": {
																							"type": "string",
																							"enum": [
																								"TEXT",
																								"NUMBER"
																							]
																						}
																					},
																					"required": [
																						"id",
																						"name",
																						"type"
																					],
																					"additionalProperties": false
																				}
																			},
																			"rows": {
																				"type": "array",
																				"items": {
																					"type": "object",
																					"properties": {
																						"id": {
																							"type": "string"
																						},
																						"cells": {
																							"type": "array",
																							"items": {
																								"type": "object",
																								"properties": {
																									"columnId": {
																										"type": "string"
																									},
																									"value": {
																										"type": [
																											"string",
																											"number"
																										]
																									}
																								},
																								"required": [
																									"columnId",
																									"value"
																								],
																								"additionalProperties": false
																							}
																						}
																					},
																					"required": [
																						"id",
																						"cells"
																					],
																					"additionalProperties": false
																				}
																			},
																			"showHeaders": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"border": {
																						"type": "boolean"
																					},
																					"rounded": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			},
																			"visibilityRule": {
																				"type": "object",
																				"properties": {
																					"customFieldId": {
																						"type": "string",
																						"minLength": 1
																					},
																					"equals": {
																						"type": "string"
																					},
																					"mode": {
																						"type": "string",
																						"enum": [
																							"SHOW_WHEN",
																							"HIDE_WHEN"
																						]
																					}
																				},
																				"required": [
																					"customFieldId",
																					"equals",
																					"mode"
																				],
																				"additionalProperties": false
																			},
																			"hidden": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type",
																			"columns",
																			"rows"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"SPACER"
																				]
																			},
																			"size": {
																				"type": "string",
																				"enum": [
																					"S",
																					"M",
																					"L",
																					"XL"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PAGE_BREAK"
																				]
																			},
																			"locked": {
																				"type": "boolean"
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	},
																	{
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"DURATION"
																				]
																			},
																			"durationType": {
																				"type": "string",
																				"enum": [
																					"NONE",
																					"SINGLE_PERIOD",
																					"RECURRING",
																					"RECURRING_WITH_INITIAL",
																					"NOT_SET"
																				]
																			},
																			"period": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"noticePeriod": {
																				"type": "object",
																				"properties": {
																					"value": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 9007199254740991
																					},
																					"unit": {
																						"type": "string",
																						"enum": [
																							"DAY",
																							"WEEK",
																							"MONTH",
																							"YEAR"
																						]
																					}
																				},
																				"required": [
																					"value",
																					"unit"
																				],
																				"additionalProperties": false
																			},
																			"startDate": {
																				"type": "string"
																			},
																			"endDate": {
																				"type": "string"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"sectionStyle": {
																				"type": "object",
																				"properties": {
																					"background": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"MUTED",
																							"TINT",
																							"ACCENT",
																							"DARK"
																						]
																					},
																					"padding": {
																						"type": "string",
																						"enum": [
																							"NONE",
																							"SM",
																							"MD",
																							"LG"
																						]
																					},
																					"bleed": {
																						"type": "boolean"
																					},
																					"border": {
																						"type": "boolean"
																					}
																				},
																				"additionalProperties": false
																			}
																		},
																		"required": [
																			"type"
																		],
																		"additionalProperties": false
																	}
																]
															},
															{
																"type": "null"
															}
														],
														"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
													},
													"createdAt": {
														"description": "Date and time when the field was created",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"updatedAt": {
														"description": "Date and time when the field was last updated",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"documentId",
													"templateId",
													"type",
													"position",
													"fieldMeta",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"example": {
													"id": "cm4k2x9p10009abcd1234efgh",
													"documentId": "cm4k2x9p10003abcd1234efgh",
													"templateId": null,
													"type": "TEXT",
													"position": 0,
													"fieldMeta": {
														"type": "TEXT",
														"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-28T09:12:00.000Z"
												}
											}
										},
										"createdAt": {
											"description": "Date and time when the template was created",
											"type": "string",
											"format": "date-time"
										},
										"updatedAt": {
											"description": "Date and time when the template was last updated",
											"type": "string",
											"format": "date-time"
										},
										"deletedAt": {
											"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"name",
										"workspaceId",
										"organizationId",
										"createdBy",
										"isGlobal",
										"templateMeta",
										"parties",
										"tags",
										"content",
										"createdAt",
										"updatedAt",
										"deletedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10010abcd1234efgh",
									"name": "Anställning",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"isGlobal": false,
									"templateMeta": {
										"signingMode": "PARALLEL",
										"forceReadFullDocument": false,
										"showChatToSigners": false,
										"language": "sv",
										"value": "540000",
										"signableAfterExpired": false,
										"sendPlainTextEmailOnly": false,
										"allowDelegation": false,
										"reminderIntervalDays": 3,
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"openVerification": "PIN",
										"internalRecipients": [
											"hr@example.com"
										],
										"visibility": "EVERYONE",
										"selectedUserIds": [
											"cm4k2x9p10010abcd1234efgh"
										],
										"nationalIdDisplayMode": "FULL",
										"sameDeviceSigning": false,
										"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
									},
									"parties": [
										{
											"id": "cm4k2x9p10004abcd1234efgh",
											"templateId": "cm4k2x9p10008abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605",
											"type": "INDIVIDUAL",
											"role": "SIGNER",
											"signingOrder": 1,
											"contactId": "cm4k2x9p10006abcd1234efgh",
											"company": null,
											"externalId": "HR-2026-0142",
											"nationalId": "191212121212",
											"country": "SE",
											"signatureMethod": "SE_BANKID",
											"delivery": [
												"EMAIL"
											],
											"signVerification": "PIN",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"tags": [
										{
											"id": "cm4k2x9p10010abcd1234efgh",
											"name": "Anställning",
											"color": "#16A34A"
										}
									],
									"content": [
										{
											"id": "cm4k2x9p10009abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"templateId": null,
											"type": "TEXT",
											"position": 0,
											"fieldMeta": {
												"type": "TEXT",
												"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"deletedAt": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires templates:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"templates:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Tag not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "tag"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"templates:write"
						]
					}
				]
			}
		},
		"/api/v1/me": {
			"get": {
				"description": "Returns the authenticated user, the workspace the request acts in (the `Sajn-Workspace` header, or the token's default workspace), and the parent organization. Used by Zapier and other integrations to verify the connection and label it for users.",
				"summary": "Get authenticated user + workspace context",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "me",
				"responses": {
					"200": {
						"description": "Authenticated user + workspace context",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "User ID"
										},
										"email": {
											"type": "string"
										},
										"name": {
											"type": [
												"string",
												"null"
											]
										},
										"workspace": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The workspace ID."
												},
												"slug": {
													"type": "string"
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"slug",
												"name"
											],
											"additionalProperties": false
										},
										"organization": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The organization ID."
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"name"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"email",
										"name",
										"workspace",
										"organization"
									],
									"additionalProperties": false,
									"description": "Authenticated user + workspace context"
								},
								"example": {
									"id": "cm4k2x9p10002abcd1234efgh",
									"email": "alex@example.com",
									"name": "Alex Berg",
									"workspace": {
										"id": "cm4k2x9p10001abcd1234efgh",
										"slug": "hr",
										"name": "HR"
									},
									"organization": {
										"id": "cm4k2x9p10000abcd1234efgh",
										"name": "Exempelbolaget AB"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/limits": {
			"get": {
				"description": "Returns the organization's plan, its quotas, what it used this billing month, and what remains: documents, eID signatures per scheme (`signatures`, keyed by a scheme such as `SE_BANKID`), members, the AI budget, identity checks, and workspaces. An unlimited quota is `null`. Money is `{ amount, currency }` in minor units: `balance` is in the organization's currency, and the AI budget is in `SEK`. Use it to gate features, such as checking how many BankID signatures remain before you send.",
				"summary": "Get plan limits and usage",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getLimits",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"plan": {
											"type": "string"
										},
										"balance": {
											"type": "object",
											"properties": {
												"amount": {
													"type": "integer",
													"minimum": -9007199254740991,
													"maximum": 9007199254740991,
													"description": "The amount in the minor unit of `currency`, such as öre for `SEK`."
												},
												"currency": {
													"type": "string",
													"enum": [
														"SEK",
														"NOK",
														"DKK",
														"EUR"
													],
													"description": "ISO 4217 currency code."
												}
											},
											"required": [
												"amount",
												"currency"
											],
											"additionalProperties": false,
											"description": "Prepaid credit in the organization's currency. It pays for use beyond the plan, and is negative when that use is invoiced afterwards."
										},
										"quota": {
											"type": "object",
											"properties": {
												"signatures": {
													"type": "object",
													"additionalProperties": {
														"type": "number"
													}
												},
												"members": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												},
												"aiBudget": {
													"description": "The AI budget, in `SEK` for every organization. Null when it's unlimited.",
													"type": [
														"object",
														"null"
													],
													"properties": {
														"amount": {
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991,
															"description": "The amount in the minor unit of `currency`, such as öre for `SEK`."
														},
														"currency": {
															"type": "string",
															"enum": [
																"SEK",
																"NOK",
																"DKK",
																"EUR"
															],
															"description": "ISO 4217 currency code."
														}
													},
													"required": [
														"amount",
														"currency"
													],
													"additionalProperties": false
												},
												"identityChecks": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												},
												"documents": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												},
												"workspaces": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												},
												"parties": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												}
											},
											"required": [
												"signatures",
												"members",
												"aiBudget",
												"identityChecks",
												"documents",
												"workspaces",
												"parties"
											],
											"additionalProperties": false
										},
										"usage": {
											"type": "object",
											"properties": {
												"signatures": {
													"type": "object",
													"additionalProperties": {
														"type": "number"
													}
												},
												"members": {
													"type": "number"
												},
												"sms": {
													"type": "number"
												},
												"aiSpent": {
													"type": "object",
													"properties": {
														"amount": {
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991,
															"description": "The amount in the minor unit of `currency`, such as öre for `SEK`."
														},
														"currency": {
															"type": "string",
															"enum": [
																"SEK",
																"NOK",
																"DKK",
																"EUR"
															],
															"description": "ISO 4217 currency code."
														}
													},
													"required": [
														"amount",
														"currency"
													],
													"additionalProperties": false,
													"description": "AI use this month, in `SEK`."
												},
												"aiSpentSigner": {
													"type": "object",
													"properties": {
														"amount": {
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991,
															"description": "The amount in the minor unit of `currency`, such as öre for `SEK`."
														},
														"currency": {
															"type": "string",
															"enum": [
																"SEK",
																"NOK",
																"DKK",
																"EUR"
															],
															"description": "ISO 4217 currency code."
														}
													},
													"required": [
														"amount",
														"currency"
													],
													"additionalProperties": false,
													"description": "The part of `aiSpent` that the AI chat on the signing page used."
												},
												"identityChecks": {
													"type": "number"
												},
												"documents": {
													"type": "number"
												},
												"workspaces": {
													"type": "number"
												}
											},
											"required": [
												"signatures",
												"members",
												"sms",
												"aiSpent",
												"aiSpentSigner",
												"identityChecks",
												"documents",
												"workspaces"
											],
											"additionalProperties": false
										},
										"remaining": {
											"type": "object",
											"properties": {
												"signatures": {
													"type": "object",
													"additionalProperties": {
														"type": "number"
													}
												},
												"members": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												},
												"aiBudget": {
													"description": "The AI budget, in `SEK` for every organization. Null when it's unlimited.",
													"type": [
														"object",
														"null"
													],
													"properties": {
														"amount": {
															"type": "integer",
															"minimum": -9007199254740991,
															"maximum": 9007199254740991,
															"description": "The amount in the minor unit of `currency`, such as öre for `SEK`."
														},
														"currency": {
															"type": "string",
															"enum": [
																"SEK",
																"NOK",
																"DKK",
																"EUR"
															],
															"description": "ISO 4217 currency code."
														}
													},
													"required": [
														"amount",
														"currency"
													],
													"additionalProperties": false
												},
												"identityChecks": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												},
												"documents": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												},
												"workspaces": {
													"anyOf": [
														{
															"type": "number"
														},
														{
															"type": "number",
															"enum": [
																null
															]
														}
													]
												}
											},
											"required": [
												"signatures",
												"members",
												"aiBudget",
												"identityChecks",
												"documents",
												"workspaces"
											],
											"additionalProperties": false
										},
										"subscription": {
											"type": "object",
											"properties": {
												"isFreeTrial": {
													"type": "boolean"
												},
												"periodEnd": {
													"type": [
														"string",
														"null"
													],
													"format": "date-time"
												},
												"cancelAtPeriodEnd": {
													"type": "boolean"
												}
											},
											"required": [
												"isFreeTrial",
												"cancelAtPeriodEnd"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"plan",
										"balance",
										"quota",
										"usage",
										"remaining",
										"subscription"
									],
									"additionalProperties": false
								},
								"example": {
									"plan": "TEAM",
									"balance": {
										"amount": 0,
										"currency": "SEK"
									},
									"quota": {
										"signatures": {
											"SE_BANKID": 100
										},
										"members": 10,
										"aiBudget": {
											"amount": 50000,
											"currency": "SEK"
										},
										"identityChecks": 50,
										"documents": 500,
										"workspaces": 5,
										"parties": 50
									},
									"usage": {
										"signatures": {
											"SE_BANKID": 12
										},
										"members": 4,
										"sms": 3,
										"aiSpent": {
											"amount": 1250,
											"currency": "SEK"
										},
										"aiSpentSigner": {
											"amount": 300,
											"currency": "SEK"
										},
										"identityChecks": 2,
										"documents": 42,
										"workspaces": 2
									},
									"remaining": {
										"signatures": {
											"SE_BANKID": 88
										},
										"members": 6,
										"aiBudget": {
											"amount": 48750,
											"currency": "SEK"
										},
										"identityChecks": 48,
										"documents": 458,
										"workspaces": 3
									},
									"subscription": {
										"isFreeTrial": false,
										"periodEnd": "2026-10-31T23:59:59.000Z",
										"cancelAtPeriodEnd": false
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/workspaces": {
			"get": {
				"description": "Returns the workspaces in the authenticated user's organization that they are a member of. The workspace the request acts in is marked with `isCurrent: true`; send another workspace's ID in the `Sajn-Workspace` header to act there.",
				"summary": "List accessible workspaces",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getWorkspaces",
				"responses": {
					"200": {
						"description": "Workspaces accessible to the authenticated user",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The workspace ID."
													},
													"slug": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"organizationId": {
														"type": "string",
														"description": "The organization ID."
													},
													"isCurrent": {
														"type": "boolean"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the workspace was created."
													}
												},
												"required": [
													"id",
													"slug",
													"name",
													"organizationId",
													"isCurrent",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Workspaces accessible to the authenticated user"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10001abcd1234efgh",
											"slug": "hr",
											"name": "HR",
											"organizationId": "cm4k2x9p10000abcd1234efgh",
											"isCurrent": true,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/members": {
			"post": {
				"description": "Adds a member of the organization to this workspace with the role `roleId`, and returns the new member. To list roles, call `GET /api/v1/roles`.\n\nIf the email address is on a domain that your organization manages through SSO, and no account has it yet, the request creates the account, makes it a member of the organization and this workspace, and returns it. The person signs in through SSO, so there's no invitation to accept.\n\nOtherwise, if no member of the organization has the email address, the request returns `404`. To invite someone who isn't a member of the organization yet, call `POST /api/v1/member-invites`.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "Add a member to the workspace",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "addMember",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"email": {
										"type": "string",
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
										"description": "Email address of a member of the organization"
									},
									"roleId": {
										"type": "string",
										"description": "Workspace role ID. To list roles, call `GET /api/v1/roles`."
									}
								},
								"required": [
									"email",
									"roleId"
								],
								"description": "Add an organization member to the workspace"
							},
							"example": {
								"email": "robin@example.com",
								"roleId": "cm4k2x9p10026abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Workspace member",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "User ID of the member. Address the member with it in `/api/v1/members/{userId}`."
										},
										"email": {
											"type": "string"
										},
										"name": {
											"description": "Full name. Null when the user has no name.",
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The workspace role ID."
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"name"
											],
											"additionalProperties": false,
											"description": "Workspace role"
										},
										"status": {
											"type": "string",
											"enum": [
												"ACTIVE",
												"INACTIVE"
											],
											"description": "`ACTIVE` once the member has signed in at least once"
										},
										"lastActiveAt": {
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"joinedAt": {
											"description": "When the user was added to the workspace",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"email",
										"name",
										"role",
										"status",
										"lastActiveAt",
										"joinedAt"
									],
									"additionalProperties": false,
									"description": "Workspace member"
								},
								"example": {
									"id": "cm4k2x9p10002abcd1234efgh",
									"email": "robin@example.com",
									"name": "Robin Ek",
									"role": {
										"id": "cm4k2x9p10026abcd1234efgh",
										"name": "Robin Ek"
									},
									"status": "ACTIVE",
									"lastActiveAt": "2026-09-28T09:15:00.000Z",
									"joinedAt": "2026-01-12T08:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "email",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "User not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "user"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:write"
						]
					}
				]
			},
			"get": {
				"description": "Returns the members of the workspace bound to the current API token, paginated and filterable by activity, role, permission and free-text search. To list the members who can approve documents, pass `permission=APPROVE_DOCUMENT`. Address an individual member by their `id`, which is their user ID.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "List workspace members",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "status",
						"in": "query",
						"description": "Filter by activity. A member is `ACTIVE` once they have signed in at least once. Omit for both.",
						"schema": {
							"type": "string",
							"enum": [
								"ACTIVE",
								"INACTIVE"
							]
						}
					},
					{
						"name": "roleId",
						"in": "query",
						"description": "Only return members with one of these workspace roles. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					{
						"name": "permission",
						"in": "query",
						"description": "Only return members whose role grants this permission, directly or through `ADMINISTRATOR`. For example, `APPROVE_DOCUMENT` lists the members who can approve documents.",
						"schema": {
							"type": "string",
							"enum": [
								"READ_DOCUMENT",
								"CREATE_DOCUMENT",
								"EDIT_DOCUMENT",
								"DELETE_DOCUMENT",
								"SEND_DOCUMENT",
								"APPROVE_DOCUMENT",
								"EDIT_AFTER_SEND",
								"SEND_WITHOUT_APPROVAL",
								"WITHDRAW_DOCUMENT",
								"VIEW_SAJN_ID",
								"MANAGE_SAJN_ID",
								"VIEW_PRIVATE_DOCUMENT",
								"READ_FILE",
								"CREATE_FILE",
								"DELETE_FILE",
								"CHANGE_DOCUMENT_VISIBILITY",
								"READ_CONTACT",
								"CREATE_CONTACT",
								"DELETE_CONTACT",
								"MANAGE_WORKSPACE_MEMBERS",
								"MANAGE_WORKSPACE_ROLES",
								"MANAGE_WORKSPACE_SETTINGS",
								"MANAGE_FORM",
								"DELETE_FORM",
								"READ_FORM_SUBMISSIONS",
								"CREATE_TEMPLATE",
								"UPDATE_TEMPLATE",
								"DELETE_TEMPLATE",
								"RESTORE_TEMPLATE",
								"PERMANENTLY_DELETE_TEMPLATE",
								"VIEW_PRIVATE_TEMPLATE",
								"CHANGE_TEMPLATE_VISIBILITY",
								"CREATE_TAG",
								"UPDATE_TAG",
								"DELETE_TAG",
								"CREATE_CUSTOM_FIELD",
								"UPDATE_CUSTOM_FIELD",
								"DELETE_CUSTOM_FIELD",
								"UPDATE_FILE",
								"UPDATE_CONTACT",
								"MANAGE_AI_SETTINGS",
								"USE_AI_CHAT",
								"USE_AI_DOCUMENT_GENERATION",
								"USE_AI_TEXT_ENHANCEMENT",
								"READ_DOCUMENT_AUDIT_LOG",
								"PERMANENTLY_DELETE_DOCUMENT",
								"RESTORE_DOCUMENT",
								"FORCE_COMPLETE_DOCUMENT",
								"READ_COMMENT",
								"CREATE_COMMENT",
								"UPDATE_COMMENT",
								"DELETE_COMMENT",
								"IMPORT_CONTACTS",
								"EXPORT_CONTACTS",
								"MANAGE_CONTACT_NOTES",
								"LOCK_TEMPLATE",
								"READ_REPORT",
								"CREATE_REPORT",
								"UPDATE_REPORT",
								"DELETE_REPORT",
								"CREATE_BULK_SEND",
								"CREATE_PRODUCT",
								"UPDATE_PRODUCT",
								"DELETE_PRODUCT",
								"MANAGE_API_TOKENS",
								"MANAGE_WEBHOOKS",
								"AUTHORIZE_OAUTH_APP",
								"MANAGE_DEVELOPER",
								"CREATE_FOLDER",
								"UPDATE_FOLDER",
								"DELETE_FOLDER",
								"LOCK_SECTION",
								"ADMINISTRATOR"
							]
						}
					},
					{
						"name": "query",
						"in": "query",
						"description": "Free-text search across member name and email",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "orderBy",
						"in": "query",
						"description": "The field to sort by. Default: `joinedAt`.",
						"schema": {
							"default": "joinedAt",
							"type": "string",
							"enum": [
								"joinedAt",
								"lastActiveAt",
								"name"
							]
						}
					},
					{
						"name": "orderDirection",
						"in": "query",
						"description": "The sort direction. Default: `desc`.",
						"schema": {
							"default": "desc",
							"type": "string",
							"enum": [
								"asc",
								"desc"
							]
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getMembers",
				"responses": {
					"200": {
						"description": "Paginated workspace members",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "User ID of the member. Address the member with it in `/api/v1/members/{userId}`."
													},
													"email": {
														"type": "string"
													},
													"name": {
														"description": "Full name. Null when the user has no name.",
														"type": [
															"string",
															"null"
														]
													},
													"role": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "The workspace role ID."
															},
															"name": {
																"type": "string"
															}
														},
														"required": [
															"id",
															"name"
														],
														"additionalProperties": false,
														"description": "Workspace role"
													},
													"status": {
														"type": "string",
														"enum": [
															"ACTIVE",
															"INACTIVE"
														],
														"description": "`ACTIVE` once the member has signed in at least once"
													},
													"lastActiveAt": {
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"joinedAt": {
														"description": "When the user was added to the workspace",
														"type": "string",
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"email",
													"name",
													"role",
													"status",
													"lastActiveAt",
													"joinedAt"
												],
												"additionalProperties": false,
												"description": "Workspace member"
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Paginated workspace members"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg",
											"role": {
												"id": "cm4k2x9p10026abcd1234efgh",
												"name": "Rekryterare"
											},
											"status": "ACTIVE",
											"lastActiveAt": "2026-09-28T09:15:00.000Z",
											"joinedAt": "2026-01-12T08:00:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:read"
						]
					}
				]
			}
		},
		"/api/v1/members/{userId}": {
			"get": {
				"description": "Get a single workspace member by their user ID.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "Get a workspace member",
				"parameters": [
					{
						"name": "userId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The user ID.",
						"example": "cm4k2x9p10002abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getMember",
				"responses": {
					"200": {
						"description": "Workspace member",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "User ID of the member. Address the member with it in `/api/v1/members/{userId}`."
										},
										"email": {
											"type": "string"
										},
										"name": {
											"description": "Full name. Null when the user has no name.",
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The workspace role ID."
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"name"
											],
											"additionalProperties": false,
											"description": "Workspace role"
										},
										"status": {
											"type": "string",
											"enum": [
												"ACTIVE",
												"INACTIVE"
											],
											"description": "`ACTIVE` once the member has signed in at least once"
										},
										"lastActiveAt": {
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"joinedAt": {
											"description": "When the user was added to the workspace",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"email",
										"name",
										"role",
										"status",
										"lastActiveAt",
										"joinedAt"
									],
									"additionalProperties": false,
									"description": "Workspace member"
								},
								"example": {
									"id": "cm4k2x9p10002abcd1234efgh",
									"email": "alex@example.com",
									"name": "Alex Berg",
									"role": {
										"id": "cm4k2x9p10026abcd1234efgh",
										"name": "Rekryterare"
									},
									"status": "ACTIVE",
									"lastActiveAt": "2026-09-28T09:15:00.000Z",
									"joinedAt": "2026-01-12T08:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "User not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "user"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:read"
						]
					}
				]
			},
			"patch": {
				"description": "Assigns a workspace member a different role. `roleId` must reference a role on this workspace. To list roles, call `GET /api/v1/roles`.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "Update a workspace member's role",
				"parameters": [
					{
						"name": "userId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The user ID.",
						"example": "cm4k2x9p10002abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateMember",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"roleId": {
										"type": "string",
										"description": "Workspace role ID to assign. To list roles, call `GET /api/v1/roles`."
									}
								},
								"required": [
									"roleId"
								],
								"description": "Update a workspace member"
							},
							"example": {
								"roleId": "cm4k2x9p10026abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Workspace member",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "User ID of the member. Address the member with it in `/api/v1/members/{userId}`."
										},
										"email": {
											"type": "string"
										},
										"name": {
											"description": "Full name. Null when the user has no name.",
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The workspace role ID."
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"name"
											],
											"additionalProperties": false,
											"description": "Workspace role"
										},
										"status": {
											"type": "string",
											"enum": [
												"ACTIVE",
												"INACTIVE"
											],
											"description": "`ACTIVE` once the member has signed in at least once"
										},
										"lastActiveAt": {
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"joinedAt": {
											"description": "When the user was added to the workspace",
											"type": "string",
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"email",
										"name",
										"role",
										"status",
										"lastActiveAt",
										"joinedAt"
									],
									"additionalProperties": false,
									"description": "Workspace member"
								},
								"example": {
									"id": "cm4k2x9p10002abcd1234efgh",
									"email": "alex@example.com",
									"name": "Alex Berg",
									"role": {
										"id": "cm4k2x9p10026abcd1234efgh",
										"name": "Rekryterare"
									},
									"status": "ACTIVE",
									"lastActiveAt": "2026-09-28T09:15:00.000Z",
									"joinedAt": "2026-01-12T08:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "roleId",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "User not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "user"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:write"
						]
					}
				]
			},
			"delete": {
				"description": "Remove a member from the workspace. This revokes their access to this workspace only — it does not remove them from the organization. You cannot remove yourself.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "Remove a member from the workspace",
				"parameters": [
					{
						"name": "userId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The user ID.",
						"example": "cm4k2x9p10002abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "removeMember",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "User ID of the removed member"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the member is removed from the workspace. The user account and its other memberships stay.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10002abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "User not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "user"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:write"
						]
					}
				]
			}
		},
		"/api/v1/member-invites": {
			"post": {
				"description": "Invites someone who isn't a member of the organization to join it and this workspace with the role `roleId`, and emails them the invitation. The invitation expires after two days; to send it again, call `POST /api/v1/member-invites/{id}/resend`. When they accept, they become a member of the workspace.\n\nTo add someone who is already a member of the organization, or whose email address is on a domain that your organization manages through SSO, call `POST /api/v1/members`. If the email address already has a pending invitation, the request returns `409 ALREADY_EXISTS`, and if it's on an SSO-managed domain, `409 INVALID_STATE`.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "Invite someone to the workspace",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createMemberInvite",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"email": {
										"type": "string",
										"format": "email",
										"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
										"description": "Email address of the person to invite. They must not be a member of the organization."
									},
									"roleId": {
										"type": "string",
										"description": "Workspace role ID the invitee gets on accepting. To list roles, call `GET /api/v1/roles`."
									}
								},
								"required": [
									"email",
									"roleId"
								],
								"description": "Invite someone to the workspace"
							},
							"example": {
								"email": "robin@example.com",
								"roleId": "cm4k2x9p10026abcd1234efgh"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "An invitation to join the workspace",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Invitation ID"
										},
										"email": {
											"type": "string"
										},
										"role": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The workspace role ID."
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"name"
											],
											"additionalProperties": false,
											"description": "The workspace role the invitee gets on accepting"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING",
												"ACCEPTED",
												"DECLINED"
											],
											"description": "`PENDING` until the invitee accepts, then `ACCEPTED`"
										},
										"invitedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member who sent the invitation"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the invitation was created."
										},
										"expiresAt": {
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"email",
										"role",
										"status",
										"invitedBy",
										"createdAt",
										"expiresAt"
									],
									"additionalProperties": false,
									"description": "An invitation to join the workspace"
								},
								"example": {
									"id": "cm4k2x9p10027abcd1234efgh",
									"email": "robin@example.com",
									"role": {
										"id": "cm4k2x9p10026abcd1234efgh",
										"name": "Rekryterare"
									},
									"status": "PENDING",
									"invitedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"expiresAt": "2026-10-28T22:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "email",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Invitation not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "invite"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:write"
						]
					}
				]
			},
			"get": {
				"description": "Returns the pending invitations for this workspace.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "List pending workspace invitations",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getMemberInvites",
				"responses": {
					"200": {
						"description": "Paginated pending workspace invitations",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Invitation ID"
													},
													"email": {
														"type": "string"
													},
													"role": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "The workspace role ID."
															},
															"name": {
																"type": "string"
															}
														},
														"required": [
															"id",
															"name"
														],
														"additionalProperties": false,
														"description": "The workspace role the invitee gets on accepting"
													},
													"status": {
														"type": "string",
														"enum": [
															"DRAFT",
															"PENDING",
															"ACCEPTED",
															"DECLINED"
														],
														"description": "`PENDING` until the invitee accepts, then `ACCEPTED`"
													},
													"invitedBy": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The member who sent the invitation"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the invitation was created."
													},
													"expiresAt": {
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													}
												},
												"required": [
													"id",
													"email",
													"role",
													"status",
													"invitedBy",
													"createdAt",
													"expiresAt"
												],
												"additionalProperties": false,
												"description": "An invitation to join the workspace"
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Paginated pending workspace invitations"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10027abcd1234efgh",
											"email": "robin@example.com",
											"role": {
												"id": "cm4k2x9p10026abcd1234efgh",
												"name": "Rekryterare"
											},
											"status": "PENDING",
											"invitedBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"expiresAt": "2026-10-28T22:00:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:read"
						]
					}
				]
			}
		},
		"/api/v1/member-invites/{id}/resend": {
			"post": {
				"description": "Sends the invitation email again, extends the expiry, and returns the invitation.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "Resend a workspace invitation",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The invitation ID.",
						"example": "cm4k2x9p10027abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "resendMemberInvite",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {}
							},
							"example": {}
						}
					}
				},
				"responses": {
					"200": {
						"description": "An invitation to join the workspace",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Invitation ID"
										},
										"email": {
											"type": "string"
										},
										"role": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "The workspace role ID."
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"id",
												"name"
											],
											"additionalProperties": false,
											"description": "The workspace role the invitee gets on accepting"
										},
										"status": {
											"type": "string",
											"enum": [
												"DRAFT",
												"PENDING",
												"ACCEPTED",
												"DECLINED"
											],
											"description": "`PENDING` until the invitee accepts, then `ACCEPTED`"
										},
										"invitedBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The member who sent the invitation"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the invitation was created."
										},
										"expiresAt": {
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										}
									},
									"required": [
										"id",
										"email",
										"role",
										"status",
										"invitedBy",
										"createdAt",
										"expiresAt"
									],
									"additionalProperties": false,
									"description": "An invitation to join the workspace"
								},
								"example": {
									"id": "cm4k2x9p10027abcd1234efgh",
									"email": "robin@example.com",
									"role": {
										"id": "cm4k2x9p10026abcd1234efgh",
										"name": "Rekryterare"
									},
									"status": "PENDING",
									"invitedBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"expiresAt": "2026-10-28T22:00:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Invitation not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "invite"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:write"
						]
					}
				]
			}
		},
		"/api/v1/member-invites/{id}": {
			"delete": {
				"description": "Cancel a pending invitation before it is accepted.\n\n**Permission required:** `MANAGE_WORKSPACE_MEMBERS` on the workspace.",
				"summary": "Revoke a workspace invitation",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The invitation ID.",
						"example": "cm4k2x9p10027abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "revokeMemberInvite",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the revoked invitation"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the invitation is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10027abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires members:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"members:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Invitation not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "invite"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"members:write"
						]
					}
				]
			}
		},
		"/api/v1/roles": {
			"get": {
				"description": "Lists the roles of the workspace bound to the current API token, with the permission keys each role grants and how many members hold it. Pass a role's `id` as `roleId` when you add or update a member or create an invitation; role names can change.\n\n**Permission required:** `MANAGE_WORKSPACE_ROLES` on the workspace.",
				"summary": "List roles",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getRoles",
				"responses": {
					"200": {
						"description": "Workspace roles available on the current workspace",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Role ID. Pass it as `roleId` when you add or update a member; role names can change."
													},
													"name": {
														"type": "string",
														"description": "Role name. Organization administrators can rename it."
													},
													"isDefault": {
														"type": "boolean",
														"description": "True for a built-in role, which you can't edit or delete"
													},
													"permissions": {
														"type": "array",
														"items": {
															"type": "string",
															"enum": [
																"READ_DOCUMENT",
																"CREATE_DOCUMENT",
																"EDIT_DOCUMENT",
																"DELETE_DOCUMENT",
																"SEND_DOCUMENT",
																"APPROVE_DOCUMENT",
																"EDIT_AFTER_SEND",
																"SEND_WITHOUT_APPROVAL",
																"WITHDRAW_DOCUMENT",
																"VIEW_SAJN_ID",
																"MANAGE_SAJN_ID",
																"VIEW_PRIVATE_DOCUMENT",
																"READ_FILE",
																"CREATE_FILE",
																"DELETE_FILE",
																"CHANGE_DOCUMENT_VISIBILITY",
																"READ_CONTACT",
																"CREATE_CONTACT",
																"DELETE_CONTACT",
																"MANAGE_WORKSPACE_MEMBERS",
																"MANAGE_WORKSPACE_ROLES",
																"MANAGE_WORKSPACE_SETTINGS",
																"MANAGE_FORM",
																"DELETE_FORM",
																"READ_FORM_SUBMISSIONS",
																"CREATE_TEMPLATE",
																"UPDATE_TEMPLATE",
																"DELETE_TEMPLATE",
																"RESTORE_TEMPLATE",
																"PERMANENTLY_DELETE_TEMPLATE",
																"VIEW_PRIVATE_TEMPLATE",
																"CHANGE_TEMPLATE_VISIBILITY",
																"CREATE_TAG",
																"UPDATE_TAG",
																"DELETE_TAG",
																"CREATE_CUSTOM_FIELD",
																"UPDATE_CUSTOM_FIELD",
																"DELETE_CUSTOM_FIELD",
																"UPDATE_FILE",
																"UPDATE_CONTACT",
																"MANAGE_AI_SETTINGS",
																"USE_AI_CHAT",
																"USE_AI_DOCUMENT_GENERATION",
																"USE_AI_TEXT_ENHANCEMENT",
																"READ_DOCUMENT_AUDIT_LOG",
																"PERMANENTLY_DELETE_DOCUMENT",
																"RESTORE_DOCUMENT",
																"FORCE_COMPLETE_DOCUMENT",
																"READ_COMMENT",
																"CREATE_COMMENT",
																"UPDATE_COMMENT",
																"DELETE_COMMENT",
																"IMPORT_CONTACTS",
																"EXPORT_CONTACTS",
																"MANAGE_CONTACT_NOTES",
																"LOCK_TEMPLATE",
																"READ_REPORT",
																"CREATE_REPORT",
																"UPDATE_REPORT",
																"DELETE_REPORT",
																"CREATE_BULK_SEND",
																"CREATE_PRODUCT",
																"UPDATE_PRODUCT",
																"DELETE_PRODUCT",
																"MANAGE_API_TOKENS",
																"MANAGE_WEBHOOKS",
																"AUTHORIZE_OAUTH_APP",
																"MANAGE_DEVELOPER",
																"CREATE_FOLDER",
																"UPDATE_FOLDER",
																"DELETE_FOLDER",
																"LOCK_SECTION",
																"ADMINISTRATOR"
															],
															"description": "A workspace permission key, e.g. \"READ_DOCUMENT\" or \"SEND_DOCUMENT\""
														},
														"description": "Permission keys granted by this role"
													},
													"memberCount": {
														"type": "number",
														"description": "Number of workspace members currently assigned this role"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the workspace role was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the workspace role was last updated."
													}
												},
												"required": [
													"id",
													"name",
													"isDefault",
													"permissions",
													"memberCount",
													"createdAt",
													"updatedAt"
												],
												"additionalProperties": false,
												"description": "Workspace role"
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Workspace roles available on the current workspace"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10026abcd1234efgh",
											"name": "Rekryterare",
											"isDefault": false,
											"permissions": [
												"READ_DOCUMENT"
											],
											"memberCount": 4,
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires roles:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"roles:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"roles:read"
						]
					}
				]
			},
			"post": {
				"description": "Creates a custom role with a set of permission keys. To list valid keys, call `GET /api/v1/permissions`. To grant `ADMINISTRATOR`, you must hold it yourself.\n\n**Permission required:** `MANAGE_WORKSPACE_ROLES` on the workspace.",
				"summary": "Create a role",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createRole",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"description": "Role name"
									},
									"permissions": {
										"default": [],
										"description": "Permission keys to grant. To list valid keys, call `GET /api/v1/permissions`.",
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"READ_DOCUMENT",
												"CREATE_DOCUMENT",
												"EDIT_DOCUMENT",
												"DELETE_DOCUMENT",
												"SEND_DOCUMENT",
												"APPROVE_DOCUMENT",
												"EDIT_AFTER_SEND",
												"SEND_WITHOUT_APPROVAL",
												"WITHDRAW_DOCUMENT",
												"VIEW_SAJN_ID",
												"MANAGE_SAJN_ID",
												"VIEW_PRIVATE_DOCUMENT",
												"READ_FILE",
												"CREATE_FILE",
												"DELETE_FILE",
												"CHANGE_DOCUMENT_VISIBILITY",
												"READ_CONTACT",
												"CREATE_CONTACT",
												"DELETE_CONTACT",
												"MANAGE_WORKSPACE_MEMBERS",
												"MANAGE_WORKSPACE_ROLES",
												"MANAGE_WORKSPACE_SETTINGS",
												"MANAGE_FORM",
												"DELETE_FORM",
												"READ_FORM_SUBMISSIONS",
												"CREATE_TEMPLATE",
												"UPDATE_TEMPLATE",
												"DELETE_TEMPLATE",
												"RESTORE_TEMPLATE",
												"PERMANENTLY_DELETE_TEMPLATE",
												"VIEW_PRIVATE_TEMPLATE",
												"CHANGE_TEMPLATE_VISIBILITY",
												"CREATE_TAG",
												"UPDATE_TAG",
												"DELETE_TAG",
												"CREATE_CUSTOM_FIELD",
												"UPDATE_CUSTOM_FIELD",
												"DELETE_CUSTOM_FIELD",
												"UPDATE_FILE",
												"UPDATE_CONTACT",
												"MANAGE_AI_SETTINGS",
												"USE_AI_CHAT",
												"USE_AI_DOCUMENT_GENERATION",
												"USE_AI_TEXT_ENHANCEMENT",
												"READ_DOCUMENT_AUDIT_LOG",
												"PERMANENTLY_DELETE_DOCUMENT",
												"RESTORE_DOCUMENT",
												"FORCE_COMPLETE_DOCUMENT",
												"READ_COMMENT",
												"CREATE_COMMENT",
												"UPDATE_COMMENT",
												"DELETE_COMMENT",
												"IMPORT_CONTACTS",
												"EXPORT_CONTACTS",
												"MANAGE_CONTACT_NOTES",
												"LOCK_TEMPLATE",
												"READ_REPORT",
												"CREATE_REPORT",
												"UPDATE_REPORT",
												"DELETE_REPORT",
												"CREATE_BULK_SEND",
												"CREATE_PRODUCT",
												"UPDATE_PRODUCT",
												"DELETE_PRODUCT",
												"MANAGE_API_TOKENS",
												"MANAGE_WEBHOOKS",
												"AUTHORIZE_OAUTH_APP",
												"MANAGE_DEVELOPER",
												"CREATE_FOLDER",
												"UPDATE_FOLDER",
												"DELETE_FOLDER",
												"LOCK_SECTION",
												"ADMINISTRATOR"
											],
											"description": "A workspace permission key, e.g. \"READ_DOCUMENT\" or \"SEND_DOCUMENT\""
										}
									}
								},
								"required": [
									"name"
								],
								"description": "Create a workspace role"
							},
							"example": {
								"name": "Rekryterare",
								"permissions": [
									"READ_DOCUMENT"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Workspace role",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Role ID. Pass it as `roleId` when you add or update a member; role names can change."
										},
										"name": {
											"type": "string",
											"description": "Role name. Organization administrators can rename it."
										},
										"isDefault": {
											"type": "boolean",
											"description": "True for a built-in role, which you can't edit or delete"
										},
										"permissions": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"READ_DOCUMENT",
													"CREATE_DOCUMENT",
													"EDIT_DOCUMENT",
													"DELETE_DOCUMENT",
													"SEND_DOCUMENT",
													"APPROVE_DOCUMENT",
													"EDIT_AFTER_SEND",
													"SEND_WITHOUT_APPROVAL",
													"WITHDRAW_DOCUMENT",
													"VIEW_SAJN_ID",
													"MANAGE_SAJN_ID",
													"VIEW_PRIVATE_DOCUMENT",
													"READ_FILE",
													"CREATE_FILE",
													"DELETE_FILE",
													"CHANGE_DOCUMENT_VISIBILITY",
													"READ_CONTACT",
													"CREATE_CONTACT",
													"DELETE_CONTACT",
													"MANAGE_WORKSPACE_MEMBERS",
													"MANAGE_WORKSPACE_ROLES",
													"MANAGE_WORKSPACE_SETTINGS",
													"MANAGE_FORM",
													"DELETE_FORM",
													"READ_FORM_SUBMISSIONS",
													"CREATE_TEMPLATE",
													"UPDATE_TEMPLATE",
													"DELETE_TEMPLATE",
													"RESTORE_TEMPLATE",
													"PERMANENTLY_DELETE_TEMPLATE",
													"VIEW_PRIVATE_TEMPLATE",
													"CHANGE_TEMPLATE_VISIBILITY",
													"CREATE_TAG",
													"UPDATE_TAG",
													"DELETE_TAG",
													"CREATE_CUSTOM_FIELD",
													"UPDATE_CUSTOM_FIELD",
													"DELETE_CUSTOM_FIELD",
													"UPDATE_FILE",
													"UPDATE_CONTACT",
													"MANAGE_AI_SETTINGS",
													"USE_AI_CHAT",
													"USE_AI_DOCUMENT_GENERATION",
													"USE_AI_TEXT_ENHANCEMENT",
													"READ_DOCUMENT_AUDIT_LOG",
													"PERMANENTLY_DELETE_DOCUMENT",
													"RESTORE_DOCUMENT",
													"FORCE_COMPLETE_DOCUMENT",
													"READ_COMMENT",
													"CREATE_COMMENT",
													"UPDATE_COMMENT",
													"DELETE_COMMENT",
													"IMPORT_CONTACTS",
													"EXPORT_CONTACTS",
													"MANAGE_CONTACT_NOTES",
													"LOCK_TEMPLATE",
													"READ_REPORT",
													"CREATE_REPORT",
													"UPDATE_REPORT",
													"DELETE_REPORT",
													"CREATE_BULK_SEND",
													"CREATE_PRODUCT",
													"UPDATE_PRODUCT",
													"DELETE_PRODUCT",
													"MANAGE_API_TOKENS",
													"MANAGE_WEBHOOKS",
													"AUTHORIZE_OAUTH_APP",
													"MANAGE_DEVELOPER",
													"CREATE_FOLDER",
													"UPDATE_FOLDER",
													"DELETE_FOLDER",
													"LOCK_SECTION",
													"ADMINISTRATOR"
												],
												"description": "A workspace permission key, e.g. \"READ_DOCUMENT\" or \"SEND_DOCUMENT\""
											},
											"description": "Permission keys granted by this role"
										},
										"memberCount": {
											"type": "number",
											"description": "Number of workspace members currently assigned this role"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the workspace role was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the workspace role was last updated."
										}
									},
									"required": [
										"id",
										"name",
										"isDefault",
										"permissions",
										"memberCount",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Workspace role"
								},
								"example": {
									"id": "cm4k2x9p10026abcd1234efgh",
									"name": "Rekryterare",
									"isDefault": false,
									"permissions": [
										"READ_DOCUMENT"
									],
									"memberCount": 4,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires roles:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"roles:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"roles:write"
						]
					}
				]
			}
		},
		"/api/v1/roles/{id}": {
			"get": {
				"description": "Gets a role, with its permission keys and member count.\n\n**Permission required:** `MANAGE_WORKSPACE_ROLES` on the workspace.",
				"summary": "Get a role",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The workspace role ID.",
						"example": "cm4k2x9p10026abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getRole",
				"responses": {
					"200": {
						"description": "Workspace role",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Role ID. Pass it as `roleId` when you add or update a member; role names can change."
										},
										"name": {
											"type": "string",
											"description": "Role name. Organization administrators can rename it."
										},
										"isDefault": {
											"type": "boolean",
											"description": "True for a built-in role, which you can't edit or delete"
										},
										"permissions": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"READ_DOCUMENT",
													"CREATE_DOCUMENT",
													"EDIT_DOCUMENT",
													"DELETE_DOCUMENT",
													"SEND_DOCUMENT",
													"APPROVE_DOCUMENT",
													"EDIT_AFTER_SEND",
													"SEND_WITHOUT_APPROVAL",
													"WITHDRAW_DOCUMENT",
													"VIEW_SAJN_ID",
													"MANAGE_SAJN_ID",
													"VIEW_PRIVATE_DOCUMENT",
													"READ_FILE",
													"CREATE_FILE",
													"DELETE_FILE",
													"CHANGE_DOCUMENT_VISIBILITY",
													"READ_CONTACT",
													"CREATE_CONTACT",
													"DELETE_CONTACT",
													"MANAGE_WORKSPACE_MEMBERS",
													"MANAGE_WORKSPACE_ROLES",
													"MANAGE_WORKSPACE_SETTINGS",
													"MANAGE_FORM",
													"DELETE_FORM",
													"READ_FORM_SUBMISSIONS",
													"CREATE_TEMPLATE",
													"UPDATE_TEMPLATE",
													"DELETE_TEMPLATE",
													"RESTORE_TEMPLATE",
													"PERMANENTLY_DELETE_TEMPLATE",
													"VIEW_PRIVATE_TEMPLATE",
													"CHANGE_TEMPLATE_VISIBILITY",
													"CREATE_TAG",
													"UPDATE_TAG",
													"DELETE_TAG",
													"CREATE_CUSTOM_FIELD",
													"UPDATE_CUSTOM_FIELD",
													"DELETE_CUSTOM_FIELD",
													"UPDATE_FILE",
													"UPDATE_CONTACT",
													"MANAGE_AI_SETTINGS",
													"USE_AI_CHAT",
													"USE_AI_DOCUMENT_GENERATION",
													"USE_AI_TEXT_ENHANCEMENT",
													"READ_DOCUMENT_AUDIT_LOG",
													"PERMANENTLY_DELETE_DOCUMENT",
													"RESTORE_DOCUMENT",
													"FORCE_COMPLETE_DOCUMENT",
													"READ_COMMENT",
													"CREATE_COMMENT",
													"UPDATE_COMMENT",
													"DELETE_COMMENT",
													"IMPORT_CONTACTS",
													"EXPORT_CONTACTS",
													"MANAGE_CONTACT_NOTES",
													"LOCK_TEMPLATE",
													"READ_REPORT",
													"CREATE_REPORT",
													"UPDATE_REPORT",
													"DELETE_REPORT",
													"CREATE_BULK_SEND",
													"CREATE_PRODUCT",
													"UPDATE_PRODUCT",
													"DELETE_PRODUCT",
													"MANAGE_API_TOKENS",
													"MANAGE_WEBHOOKS",
													"AUTHORIZE_OAUTH_APP",
													"MANAGE_DEVELOPER",
													"CREATE_FOLDER",
													"UPDATE_FOLDER",
													"DELETE_FOLDER",
													"LOCK_SECTION",
													"ADMINISTRATOR"
												],
												"description": "A workspace permission key, e.g. \"READ_DOCUMENT\" or \"SEND_DOCUMENT\""
											},
											"description": "Permission keys granted by this role"
										},
										"memberCount": {
											"type": "number",
											"description": "Number of workspace members currently assigned this role"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the workspace role was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the workspace role was last updated."
										}
									},
									"required": [
										"id",
										"name",
										"isDefault",
										"permissions",
										"memberCount",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Workspace role"
								},
								"example": {
									"id": "cm4k2x9p10026abcd1234efgh",
									"name": "Rekryterare",
									"isDefault": false,
									"permissions": [
										"READ_DOCUMENT"
									],
									"memberCount": 4,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires roles:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"roles:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Workspace role not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "role"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"roles:read"
						]
					}
				]
			},
			"patch": {
				"description": "Renames a role, replaces its permissions, or both. You can't edit a built-in role. To grant `ADMINISTRATOR`, you must hold it yourself.\n\n**Permission required:** `MANAGE_WORKSPACE_ROLES` on the workspace.",
				"summary": "Update a role",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The workspace role ID.",
						"example": "cm4k2x9p10026abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateRole",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"description": "New role name",
										"type": "string",
										"minLength": 1
									},
									"permissions": {
										"description": "Replacement set of permission keys. Omit to leave permissions unchanged.",
										"type": "array",
										"items": {
											"type": "string",
											"enum": [
												"READ_DOCUMENT",
												"CREATE_DOCUMENT",
												"EDIT_DOCUMENT",
												"DELETE_DOCUMENT",
												"SEND_DOCUMENT",
												"APPROVE_DOCUMENT",
												"EDIT_AFTER_SEND",
												"SEND_WITHOUT_APPROVAL",
												"WITHDRAW_DOCUMENT",
												"VIEW_SAJN_ID",
												"MANAGE_SAJN_ID",
												"VIEW_PRIVATE_DOCUMENT",
												"READ_FILE",
												"CREATE_FILE",
												"DELETE_FILE",
												"CHANGE_DOCUMENT_VISIBILITY",
												"READ_CONTACT",
												"CREATE_CONTACT",
												"DELETE_CONTACT",
												"MANAGE_WORKSPACE_MEMBERS",
												"MANAGE_WORKSPACE_ROLES",
												"MANAGE_WORKSPACE_SETTINGS",
												"MANAGE_FORM",
												"DELETE_FORM",
												"READ_FORM_SUBMISSIONS",
												"CREATE_TEMPLATE",
												"UPDATE_TEMPLATE",
												"DELETE_TEMPLATE",
												"RESTORE_TEMPLATE",
												"PERMANENTLY_DELETE_TEMPLATE",
												"VIEW_PRIVATE_TEMPLATE",
												"CHANGE_TEMPLATE_VISIBILITY",
												"CREATE_TAG",
												"UPDATE_TAG",
												"DELETE_TAG",
												"CREATE_CUSTOM_FIELD",
												"UPDATE_CUSTOM_FIELD",
												"DELETE_CUSTOM_FIELD",
												"UPDATE_FILE",
												"UPDATE_CONTACT",
												"MANAGE_AI_SETTINGS",
												"USE_AI_CHAT",
												"USE_AI_DOCUMENT_GENERATION",
												"USE_AI_TEXT_ENHANCEMENT",
												"READ_DOCUMENT_AUDIT_LOG",
												"PERMANENTLY_DELETE_DOCUMENT",
												"RESTORE_DOCUMENT",
												"FORCE_COMPLETE_DOCUMENT",
												"READ_COMMENT",
												"CREATE_COMMENT",
												"UPDATE_COMMENT",
												"DELETE_COMMENT",
												"IMPORT_CONTACTS",
												"EXPORT_CONTACTS",
												"MANAGE_CONTACT_NOTES",
												"LOCK_TEMPLATE",
												"READ_REPORT",
												"CREATE_REPORT",
												"UPDATE_REPORT",
												"DELETE_REPORT",
												"CREATE_BULK_SEND",
												"CREATE_PRODUCT",
												"UPDATE_PRODUCT",
												"DELETE_PRODUCT",
												"MANAGE_API_TOKENS",
												"MANAGE_WEBHOOKS",
												"AUTHORIZE_OAUTH_APP",
												"MANAGE_DEVELOPER",
												"CREATE_FOLDER",
												"UPDATE_FOLDER",
												"DELETE_FOLDER",
												"LOCK_SECTION",
												"ADMINISTRATOR"
											],
											"description": "A workspace permission key, e.g. \"READ_DOCUMENT\" or \"SEND_DOCUMENT\""
										}
									}
								},
								"description": "Update a workspace role"
							},
							"example": {
								"name": "Rekryterare",
								"permissions": [
									"READ_DOCUMENT"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Workspace role",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Role ID. Pass it as `roleId` when you add or update a member; role names can change."
										},
										"name": {
											"type": "string",
											"description": "Role name. Organization administrators can rename it."
										},
										"isDefault": {
											"type": "boolean",
											"description": "True for a built-in role, which you can't edit or delete"
										},
										"permissions": {
											"type": "array",
											"items": {
												"type": "string",
												"enum": [
													"READ_DOCUMENT",
													"CREATE_DOCUMENT",
													"EDIT_DOCUMENT",
													"DELETE_DOCUMENT",
													"SEND_DOCUMENT",
													"APPROVE_DOCUMENT",
													"EDIT_AFTER_SEND",
													"SEND_WITHOUT_APPROVAL",
													"WITHDRAW_DOCUMENT",
													"VIEW_SAJN_ID",
													"MANAGE_SAJN_ID",
													"VIEW_PRIVATE_DOCUMENT",
													"READ_FILE",
													"CREATE_FILE",
													"DELETE_FILE",
													"CHANGE_DOCUMENT_VISIBILITY",
													"READ_CONTACT",
													"CREATE_CONTACT",
													"DELETE_CONTACT",
													"MANAGE_WORKSPACE_MEMBERS",
													"MANAGE_WORKSPACE_ROLES",
													"MANAGE_WORKSPACE_SETTINGS",
													"MANAGE_FORM",
													"DELETE_FORM",
													"READ_FORM_SUBMISSIONS",
													"CREATE_TEMPLATE",
													"UPDATE_TEMPLATE",
													"DELETE_TEMPLATE",
													"RESTORE_TEMPLATE",
													"PERMANENTLY_DELETE_TEMPLATE",
													"VIEW_PRIVATE_TEMPLATE",
													"CHANGE_TEMPLATE_VISIBILITY",
													"CREATE_TAG",
													"UPDATE_TAG",
													"DELETE_TAG",
													"CREATE_CUSTOM_FIELD",
													"UPDATE_CUSTOM_FIELD",
													"DELETE_CUSTOM_FIELD",
													"UPDATE_FILE",
													"UPDATE_CONTACT",
													"MANAGE_AI_SETTINGS",
													"USE_AI_CHAT",
													"USE_AI_DOCUMENT_GENERATION",
													"USE_AI_TEXT_ENHANCEMENT",
													"READ_DOCUMENT_AUDIT_LOG",
													"PERMANENTLY_DELETE_DOCUMENT",
													"RESTORE_DOCUMENT",
													"FORCE_COMPLETE_DOCUMENT",
													"READ_COMMENT",
													"CREATE_COMMENT",
													"UPDATE_COMMENT",
													"DELETE_COMMENT",
													"IMPORT_CONTACTS",
													"EXPORT_CONTACTS",
													"MANAGE_CONTACT_NOTES",
													"LOCK_TEMPLATE",
													"READ_REPORT",
													"CREATE_REPORT",
													"UPDATE_REPORT",
													"DELETE_REPORT",
													"CREATE_BULK_SEND",
													"CREATE_PRODUCT",
													"UPDATE_PRODUCT",
													"DELETE_PRODUCT",
													"MANAGE_API_TOKENS",
													"MANAGE_WEBHOOKS",
													"AUTHORIZE_OAUTH_APP",
													"MANAGE_DEVELOPER",
													"CREATE_FOLDER",
													"UPDATE_FOLDER",
													"DELETE_FOLDER",
													"LOCK_SECTION",
													"ADMINISTRATOR"
												],
												"description": "A workspace permission key, e.g. \"READ_DOCUMENT\" or \"SEND_DOCUMENT\""
											},
											"description": "Permission keys granted by this role"
										},
										"memberCount": {
											"type": "number",
											"description": "Number of workspace members currently assigned this role"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the workspace role was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the workspace role was last updated."
										}
									},
									"required": [
										"id",
										"name",
										"isDefault",
										"permissions",
										"memberCount",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false,
									"description": "Workspace role"
								},
								"example": {
									"id": "cm4k2x9p10026abcd1234efgh",
									"name": "Rekryterare",
									"isDefault": false,
									"permissions": [
										"READ_DOCUMENT"
									],
									"memberCount": 4,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires roles:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"roles:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Workspace role not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "role"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"roles:write"
						]
					}
				]
			},
			"delete": {
				"description": "Deletes a custom role. You can't delete a built-in role, or a role that members still hold; assign those members another role first.\n\n**Permission required:** `MANAGE_WORKSPACE_ROLES` on the workspace.",
				"summary": "Delete a role",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The workspace role ID.",
						"example": "cm4k2x9p10026abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteRole",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the deleted role"
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the workspace role is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10026abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires roles:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"roles:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Workspace role not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "role"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"roles:write"
						]
					}
				]
			}
		},
		"/api/v1/permissions": {
			"get": {
				"description": "Lists every permission key you can grant to a role, with a label. Use the keys when you create or update a role.\n\n**Permission required:** `MANAGE_WORKSPACE_ROLES` on the workspace.",
				"summary": "List permissions",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getPermissions",
				"responses": {
					"200": {
						"description": "Assignable workspace permissions",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"key": {
														"type": "string",
														"enum": [
															"READ_DOCUMENT",
															"CREATE_DOCUMENT",
															"EDIT_DOCUMENT",
															"DELETE_DOCUMENT",
															"SEND_DOCUMENT",
															"APPROVE_DOCUMENT",
															"EDIT_AFTER_SEND",
															"SEND_WITHOUT_APPROVAL",
															"WITHDRAW_DOCUMENT",
															"VIEW_SAJN_ID",
															"MANAGE_SAJN_ID",
															"VIEW_PRIVATE_DOCUMENT",
															"READ_FILE",
															"CREATE_FILE",
															"DELETE_FILE",
															"CHANGE_DOCUMENT_VISIBILITY",
															"READ_CONTACT",
															"CREATE_CONTACT",
															"DELETE_CONTACT",
															"MANAGE_WORKSPACE_MEMBERS",
															"MANAGE_WORKSPACE_ROLES",
															"MANAGE_WORKSPACE_SETTINGS",
															"MANAGE_FORM",
															"DELETE_FORM",
															"READ_FORM_SUBMISSIONS",
															"CREATE_TEMPLATE",
															"UPDATE_TEMPLATE",
															"DELETE_TEMPLATE",
															"RESTORE_TEMPLATE",
															"PERMANENTLY_DELETE_TEMPLATE",
															"VIEW_PRIVATE_TEMPLATE",
															"CHANGE_TEMPLATE_VISIBILITY",
															"CREATE_TAG",
															"UPDATE_TAG",
															"DELETE_TAG",
															"CREATE_CUSTOM_FIELD",
															"UPDATE_CUSTOM_FIELD",
															"DELETE_CUSTOM_FIELD",
															"UPDATE_FILE",
															"UPDATE_CONTACT",
															"MANAGE_AI_SETTINGS",
															"USE_AI_CHAT",
															"USE_AI_DOCUMENT_GENERATION",
															"USE_AI_TEXT_ENHANCEMENT",
															"READ_DOCUMENT_AUDIT_LOG",
															"PERMANENTLY_DELETE_DOCUMENT",
															"RESTORE_DOCUMENT",
															"FORCE_COMPLETE_DOCUMENT",
															"READ_COMMENT",
															"CREATE_COMMENT",
															"UPDATE_COMMENT",
															"DELETE_COMMENT",
															"IMPORT_CONTACTS",
															"EXPORT_CONTACTS",
															"MANAGE_CONTACT_NOTES",
															"LOCK_TEMPLATE",
															"READ_REPORT",
															"CREATE_REPORT",
															"UPDATE_REPORT",
															"DELETE_REPORT",
															"CREATE_BULK_SEND",
															"CREATE_PRODUCT",
															"UPDATE_PRODUCT",
															"DELETE_PRODUCT",
															"MANAGE_API_TOKENS",
															"MANAGE_WEBHOOKS",
															"AUTHORIZE_OAUTH_APP",
															"MANAGE_DEVELOPER",
															"CREATE_FOLDER",
															"UPDATE_FOLDER",
															"DELETE_FOLDER",
															"LOCK_SECTION",
															"ADMINISTRATOR"
														],
														"description": "A workspace permission key, e.g. \"READ_DOCUMENT\" or \"SEND_DOCUMENT\""
													},
													"label": {
														"type": "string",
														"description": "Human-readable Swedish label"
													}
												},
												"required": [
													"key",
													"label"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "Assignable workspace permissions"
								},
								"example": {
									"data": [
										{
											"key": "READ_DOCUMENT",
											"label": "Startdatum"
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires roles:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"roles:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"roles:read"
						]
					}
				]
			}
		},
		"/api/v1/folders": {
			"get": {
				"description": "List folders in the current workspace, optionally filtered by type (DOCUMENT or TEMPLATE) and parent folder.\n\nPass `parentFolderId` to list direct children of a specific folder. Omit it to list top-level folders. The newest folders come first.",
				"summary": "List folders",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "type",
						"in": "query",
						"description": "Return only DOCUMENT or TEMPLATE folders. Omit for both.",
						"schema": {
							"type": "string",
							"enum": [
								"DOCUMENT",
								"TEMPLATE"
							]
						}
					},
					{
						"name": "parentFolderId",
						"in": "query",
						"description": "Return only folders directly under this parent. Omit for top-level folders.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only folders created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only folders created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only folders updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only folders updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFolders",
				"responses": {
					"200": {
						"description": "List of folders",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Unique folder identifier"
													},
													"name": {
														"type": "string",
														"description": "Folder name"
													},
													"type": {
														"type": "string",
														"enum": [
															"DOCUMENT",
															"TEMPLATE"
														],
														"description": "Folder type: DOCUMENT or TEMPLATE"
													},
													"parentFolderId": {
														"description": "Parent folder id, or null for top-level folders",
														"type": [
															"string",
															"null"
														]
													},
													"workspaceId": {
														"type": "string",
														"description": "The workspace ID."
													},
													"createdBy": {
														"type": "object",
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false,
														"description": "The user who created the folder"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the folder was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the folder was last updated."
													},
													"childFolderCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "Number of folders directly in this folder, not counting trashed ones"
													},
													"itemCount": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "Number of documents or templates directly in this folder that you can see, not counting trashed or archived ones"
													}
												},
												"required": [
													"id",
													"name",
													"type",
													"parentFolderId",
													"workspaceId",
													"createdBy",
													"createdAt",
													"updatedAt",
													"childFolderCount",
													"itemCount"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false,
									"description": "List of folders"
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10011abcd1234efgh",
											"name": "Anställningsavtal 2026",
											"type": "DOCUMENT",
											"parentFolderId": null,
											"workspaceId": "cm4k2x9p10001abcd1234efgh",
											"createdBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"childFolderCount": 0,
											"itemCount": 12
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Create a new folder for documents or templates.\n\n`type` selects which entity the folder organizes. Pass `parentFolderId` to nest under an existing folder.",
				"summary": "Create a folder",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createFolder",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string",
										"minLength": 1,
										"description": "Folder name"
									},
									"type": {
										"type": "string",
										"enum": [
											"DOCUMENT",
											"TEMPLATE"
										],
										"description": "Folder type: DOCUMENT or TEMPLATE"
									},
									"parentFolderId": {
										"description": "Parent folder to nest under. Omit for a top-level folder.",
										"type": [
											"string",
											"null"
										]
									}
								},
								"required": [
									"name",
									"type"
								]
							},
							"example": {
								"name": "Anställningsavtal 2026",
								"type": "DOCUMENT",
								"parentFolderId": null
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique folder identifier"
										},
										"name": {
											"type": "string",
											"description": "Folder name"
										},
										"type": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"TEMPLATE"
											],
											"description": "Folder type: DOCUMENT or TEMPLATE"
										},
										"parentFolderId": {
											"description": "Parent folder id, or null for top-level folders",
											"type": [
												"string",
												"null"
											]
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the folder"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the folder was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the folder was last updated."
										},
										"childFolderCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "Number of folders directly in this folder, not counting trashed ones"
										},
										"itemCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "Number of documents or templates directly in this folder that you can see, not counting trashed or archived ones"
										}
									},
									"required": [
										"id",
										"name",
										"type",
										"parentFolderId",
										"workspaceId",
										"createdBy",
										"createdAt",
										"updatedAt",
										"childFolderCount",
										"itemCount"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10011abcd1234efgh",
									"name": "Anställningsavtal 2026",
									"type": "DOCUMENT",
									"parentFolderId": null,
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"childFolderCount": 0,
									"itemCount": 12
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/folders/{id}": {
			"get": {
				"description": "Retrieve a single folder. The folder must belong to the current workspace.",
				"summary": "Get a folder by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The folder ID.",
						"example": "cm4k2x9p10011abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getFolder",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique folder identifier"
										},
										"name": {
											"type": "string",
											"description": "Folder name"
										},
										"type": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"TEMPLATE"
											],
											"description": "Folder type: DOCUMENT or TEMPLATE"
										},
										"parentFolderId": {
											"description": "Parent folder id, or null for top-level folders",
											"type": [
												"string",
												"null"
											]
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the folder"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the folder was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the folder was last updated."
										},
										"childFolderCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "Number of folders directly in this folder, not counting trashed ones"
										},
										"itemCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "Number of documents or templates directly in this folder that you can see, not counting trashed or archived ones"
										}
									},
									"required": [
										"id",
										"name",
										"type",
										"parentFolderId",
										"workspaceId",
										"createdBy",
										"createdAt",
										"updatedAt",
										"childFolderCount",
										"itemCount"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10011abcd1234efgh",
									"name": "Anställningsavtal 2026",
									"type": "DOCUMENT",
									"parentFolderId": null,
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"childFolderCount": 0,
									"itemCount": 12
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Folder not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "folder"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"patch": {
				"description": "Rename a folder (`name`) and/or move it under another parent (`parentFolderId`). Pass `parentFolderId: null` to move to top-level.",
				"summary": "Rename or move a folder",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The folder ID.",
						"example": "cm4k2x9p10011abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateFolder",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"name": {
										"description": "Rename the folder",
										"type": "string",
										"minLength": 1
									},
									"parentFolderId": {
										"description": "Move the folder. Pass null to move to top-level.",
										"type": [
											"string",
											"null"
										]
									}
								}
							},
							"example": {
								"name": "Anställningsavtal 2026",
								"parentFolderId": null
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Unique folder identifier"
										},
										"name": {
											"type": "string",
											"description": "Folder name"
										},
										"type": {
											"type": "string",
											"enum": [
												"DOCUMENT",
												"TEMPLATE"
											],
											"description": "Folder type: DOCUMENT or TEMPLATE"
										},
										"parentFolderId": {
											"description": "Parent folder id, or null for top-level folders",
											"type": [
												"string",
												"null"
											]
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"createdBy": {
											"type": "object",
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false,
											"description": "The user who created the folder"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the folder was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the folder was last updated."
										},
										"childFolderCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "Number of folders directly in this folder, not counting trashed ones"
										},
										"itemCount": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991,
											"description": "Number of documents or templates directly in this folder that you can see, not counting trashed or archived ones"
										}
									},
									"required": [
										"id",
										"name",
										"type",
										"parentFolderId",
										"workspaceId",
										"createdBy",
										"createdAt",
										"updatedAt",
										"childFolderCount",
										"itemCount"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10011abcd1234efgh",
									"name": "Anställningsavtal 2026",
									"type": "DOCUMENT",
									"parentFolderId": null,
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"childFolderCount": 0,
									"itemCount": 12
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "name",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Folder not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "folder"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Soft-deletes a folder. The folder must be empty — move out all child folders, documents, and templates first.",
				"summary": "Delete a folder",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The folder ID.",
						"example": "cm4k2x9p10011abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteFolder",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The folder ID."
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the folder is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10011abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Folder not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "folder"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:delete"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/comments": {
			"get": {
				"description": "Returns the comment threads on a document, newest first. Each item is a thread: the comment that opened it and its replies are in `messages`. Filter by `status` (`OPEN` or `RESOLVED`), or omit it for both.",
				"summary": "List comment threads on a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "status",
						"in": "query",
						"description": "Filter by thread status. Omit for both.",
						"schema": {
							"type": "string",
							"enum": [
								"OPEN",
								"RESOLVED"
							]
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only threads created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only threads created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only threads updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only threads updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentComments",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The comment thread ID."
													},
													"documentId": {
														"type": [
															"string",
															"null"
														],
														"description": "The document ID."
													},
													"status": {
														"type": "string",
														"enum": [
															"OPEN",
															"RESOLVED"
														],
														"description": "Whether the thread is open or resolved."
													},
													"visibility": {
														"type": "string",
														"enum": [
															"INTERNAL",
															"SHARED"
														],
														"description": "If `SHARED`, every party on the document sees the thread. If `INTERNAL`, only the workspace does."
													},
													"excerpt": {
														"description": "The document text the thread refers to.",
														"type": [
															"string",
															"null"
														]
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the comment thread was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the comment thread was last updated."
													},
													"resolvedAt": {
														"description": "When the thread was resolved. Null while it's open.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"createdBy": {
														"description": "Who wrote it. Null when the author no longer exists.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "The user ID."
															},
															"name": {
																"type": [
																	"string",
																	"null"
																]
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"email"
														],
														"additionalProperties": false
													},
													"resolvedBy": {
														"description": "Who wrote it. Null when the author no longer exists.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "The user ID."
															},
															"name": {
																"type": [
																	"string",
																	"null"
																]
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"email"
														],
														"additionalProperties": false
													},
													"messages": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The message ID."
																},
																"threadId": {
																	"type": "string",
																	"description": "The comment thread ID."
																},
																"parentId": {
																	"description": "The ID of the message this one replies to. Null for a top-level message.",
																	"type": [
																		"string",
																		"null"
																	]
																},
																"body": {
																	"type": "string",
																	"description": "The message text."
																},
																"mentions": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	},
																	"description": "IDs of the users the message mentions."
																},
																"createdAt": {
																	"type": "string",
																	"format": "date-time",
																	"description": "When the message was created."
																},
																"editedAt": {
																	"description": "When the message was last edited. Null if it never was.",
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																},
																"deletedAt": {
																	"description": "When the message was deleted. Null if it wasn't.",
																	"type": [
																		"string",
																		"null"
																	],
																	"format": "date-time"
																},
																"author": {
																	"type": "object",
																	"properties": {
																		"type": {
																			"type": "string",
																			"enum": [
																				"USER",
																				"AI",
																				"SIGNER"
																			],
																			"description": "Whether a workspace member, the AI assistant, or a party wrote the message."
																		},
																		"id": {
																			"description": "The user or party ID. Null for the AI assistant, or when the author no longer exists.",
																			"type": [
																				"string",
																				"null"
																			]
																		},
																		"name": {
																			"type": [
																				"string",
																				"null"
																			]
																		},
																		"email": {
																			"type": [
																				"string",
																				"null"
																			]
																		}
																	},
																	"required": [
																		"type",
																		"id",
																		"name",
																		"email"
																	],
																	"additionalProperties": false,
																	"description": "Who wrote the message."
																}
															},
															"required": [
																"id",
																"threadId",
																"parentId",
																"body",
																"mentions",
																"createdAt",
																"editedAt",
																"deletedAt",
																"author"
															],
															"additionalProperties": false
														},
														"description": "The thread's messages, oldest first."
													}
												},
												"required": [
													"id",
													"documentId",
													"status",
													"visibility",
													"excerpt",
													"createdAt",
													"updatedAt",
													"resolvedAt",
													"createdBy",
													"resolvedBy",
													"messages"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10018abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"status": "OPEN",
											"visibility": "INTERNAL",
											"excerpt": "Anställningen börjar den 1 november 2026",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"resolvedAt": null,
											"createdBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com"
											},
											"resolvedBy": null,
											"messages": [
												{
													"id": "cm4k2x9p10019abcd1234efgh",
													"threadId": "cm4k2x9p10018abcd1234efgh",
													"parentId": "cm4k2x9p10019abcd1234efgh",
													"body": "Kan vi ändra startdatum till den 1 december?",
													"mentions": [
														"cm4k2x9p10002abcd1234efgh"
													],
													"createdAt": "2026-09-28T09:12:00.000Z",
													"editedAt": null,
													"deletedAt": null,
													"author": {
														"type": "USER",
														"id": "cm4k2x9p10002abcd1234efgh",
														"name": "Alex Berg",
														"email": "alex@example.com"
													}
												}
											]
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Comment thread not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "thread"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Start a new comment thread on a document with an initial message. Mention users by passing their user IDs in `mentions`.\n\nTo place the thread on a passage, send the passage as `excerpt` and the block it's in as `contentId`. If the excerpt appears more than once in the block, `prefix` and `suffix` pick the occurrence. To import comments from another tool without duplicates, send each with its own `externalId`. A request with an `externalId` the document already has returns that thread and creates nothing.",
				"summary": "Create a comment thread on a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createDocumentCommentThread",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"body": {
										"type": "string",
										"minLength": 1,
										"description": "Initial message body for the new thread"
									},
									"excerpt": {
										"description": "Optional excerpt of the document content the thread refers to",
										"type": [
											"string",
											"null"
										]
									},
									"mentions": {
										"description": "User IDs mentioned in the message",
										"type": "array",
										"items": {
											"type": "string"
										}
									},
									"visibility": {
										"description": "SHARED makes the thread visible to every party on the document; INTERNAL (the default) keeps it to the workspace",
										"type": "string",
										"enum": [
											"INTERNAL",
											"SHARED"
										]
									},
									"contentId": {
										"description": "The content block the thread is on. With `excerpt`, sajn highlights the excerpt in that block. Without `contentId`, the thread is on the whole document.",
										"type": "string",
										"minLength": 1
									},
									"prefix": {
										"description": "Up to 200 characters of the text right before the excerpt. Picks the occurrence when the excerpt appears more than once in the block.",
										"type": "string",
										"maxLength": 200
									},
									"suffix": {
										"description": "Up to 200 characters of the text right after the excerpt. Picks the occurrence when the excerpt appears more than once in the block.",
										"type": "string",
										"maxLength": 200
									},
									"externalId": {
										"description": "Your own ID for the thread, such as the ID of a comment you import. A second request with the same `externalId` on the document returns the thread the first one created.",
										"type": "string",
										"minLength": 1,
										"maxLength": 200
									}
								},
								"required": [
									"body"
								]
							},
							"example": {
								"body": "Kan vi ändra startdatum till den 1 december?",
								"excerpt": "Anställningen börjar den 1 november 2026",
								"mentions": [
									"cm4k2x9p10002abcd1234efgh"
								],
								"visibility": "INTERNAL",
								"contentId": "cm4k2x9p10018abcd1234efgh",
								"prefix": "Anställningsavtal – Kai Lindqvist",
								"suffix": "Anställningsavtal – Kai Lindqvist",
								"externalId": "HR-2026-0142"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The comment thread ID."
										},
										"documentId": {
											"type": [
												"string",
												"null"
											],
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"OPEN",
												"RESOLVED"
											],
											"description": "Whether the thread is open or resolved."
										},
										"visibility": {
											"type": "string",
											"enum": [
												"INTERNAL",
												"SHARED"
											],
											"description": "If `SHARED`, every party on the document sees the thread. If `INTERNAL`, only the workspace does."
										},
										"excerpt": {
											"description": "The document text the thread refers to.",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the comment thread was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the comment thread was last updated."
										},
										"resolvedAt": {
											"description": "When the thread was resolved. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"createdBy": {
											"description": "Who wrote it. Null when the author no longer exists.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The user ID."
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"email"
											],
											"additionalProperties": false
										},
										"resolvedBy": {
											"description": "Who wrote it. Null when the author no longer exists.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The user ID."
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"email"
											],
											"additionalProperties": false
										},
										"messages": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The message ID."
													},
													"threadId": {
														"type": "string",
														"description": "The comment thread ID."
													},
													"parentId": {
														"description": "The ID of the message this one replies to. Null for a top-level message.",
														"type": [
															"string",
															"null"
														]
													},
													"body": {
														"type": "string",
														"description": "The message text."
													},
													"mentions": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "IDs of the users the message mentions."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the message was created."
													},
													"editedAt": {
														"description": "When the message was last edited. Null if it never was.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"deletedAt": {
														"description": "When the message was deleted. Null if it wasn't.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"author": {
														"type": "object",
														"properties": {
															"type": {
																"type": "string",
																"enum": [
																	"USER",
																	"AI",
																	"SIGNER"
																],
																"description": "Whether a workspace member, the AI assistant, or a party wrote the message."
															},
															"id": {
																"description": "The user or party ID. Null for the AI assistant, or when the author no longer exists.",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"type": [
																	"string",
																	"null"
																]
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"type",
															"id",
															"name",
															"email"
														],
														"additionalProperties": false,
														"description": "Who wrote the message."
													}
												},
												"required": [
													"id",
													"threadId",
													"parentId",
													"body",
													"mentions",
													"createdAt",
													"editedAt",
													"deletedAt",
													"author"
												],
												"additionalProperties": false
											},
											"description": "The thread's messages, oldest first."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"visibility",
										"excerpt",
										"createdAt",
										"updatedAt",
										"resolvedAt",
										"createdBy",
										"resolvedBy",
										"messages"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10018abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "OPEN",
									"visibility": "INTERNAL",
									"excerpt": "Anställningen börjar den 1 november 2026",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"resolvedAt": null,
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"name": "Alex Berg",
										"email": "alex@example.com"
									},
									"resolvedBy": null,
									"messages": [
										{
											"id": "cm4k2x9p10019abcd1234efgh",
											"threadId": "cm4k2x9p10018abcd1234efgh",
											"parentId": "cm4k2x9p10019abcd1234efgh",
											"body": "Kan vi ändra startdatum till den 1 december?",
											"mentions": [
												"cm4k2x9p10002abcd1234efgh"
											],
											"createdAt": "2026-09-28T09:12:00.000Z",
											"editedAt": null,
											"deletedAt": null,
											"author": {
												"type": "USER",
												"id": "cm4k2x9p10002abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com"
											}
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "body",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Comment thread not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "thread"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/comments/{threadId}": {
			"get": {
				"description": "Returns one comment thread on a document, with its messages oldest first.",
				"summary": "Get a comment thread",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "threadId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The comment thread ID.",
						"example": "cm4k2x9p10018abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentCommentThread",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The comment thread ID."
										},
										"documentId": {
											"type": [
												"string",
												"null"
											],
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"OPEN",
												"RESOLVED"
											],
											"description": "Whether the thread is open or resolved."
										},
										"visibility": {
											"type": "string",
											"enum": [
												"INTERNAL",
												"SHARED"
											],
											"description": "If `SHARED`, every party on the document sees the thread. If `INTERNAL`, only the workspace does."
										},
										"excerpt": {
											"description": "The document text the thread refers to.",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the comment thread was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the comment thread was last updated."
										},
										"resolvedAt": {
											"description": "When the thread was resolved. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"createdBy": {
											"description": "Who wrote it. Null when the author no longer exists.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The user ID."
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"email"
											],
											"additionalProperties": false
										},
										"resolvedBy": {
											"description": "Who wrote it. Null when the author no longer exists.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The user ID."
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"email"
											],
											"additionalProperties": false
										},
										"messages": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The message ID."
													},
													"threadId": {
														"type": "string",
														"description": "The comment thread ID."
													},
													"parentId": {
														"description": "The ID of the message this one replies to. Null for a top-level message.",
														"type": [
															"string",
															"null"
														]
													},
													"body": {
														"type": "string",
														"description": "The message text."
													},
													"mentions": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "IDs of the users the message mentions."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the message was created."
													},
													"editedAt": {
														"description": "When the message was last edited. Null if it never was.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"deletedAt": {
														"description": "When the message was deleted. Null if it wasn't.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"author": {
														"type": "object",
														"properties": {
															"type": {
																"type": "string",
																"enum": [
																	"USER",
																	"AI",
																	"SIGNER"
																],
																"description": "Whether a workspace member, the AI assistant, or a party wrote the message."
															},
															"id": {
																"description": "The user or party ID. Null for the AI assistant, or when the author no longer exists.",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"type": [
																	"string",
																	"null"
																]
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"type",
															"id",
															"name",
															"email"
														],
														"additionalProperties": false,
														"description": "Who wrote the message."
													}
												},
												"required": [
													"id",
													"threadId",
													"parentId",
													"body",
													"mentions",
													"createdAt",
													"editedAt",
													"deletedAt",
													"author"
												],
												"additionalProperties": false
											},
											"description": "The thread's messages, oldest first."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"visibility",
										"excerpt",
										"createdAt",
										"updatedAt",
										"resolvedAt",
										"createdBy",
										"resolvedBy",
										"messages"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10018abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "OPEN",
									"visibility": "INTERNAL",
									"excerpt": "Anställningen börjar den 1 november 2026",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"resolvedAt": null,
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"name": "Alex Berg",
										"email": "alex@example.com"
									},
									"resolvedBy": null,
									"messages": [
										{
											"id": "cm4k2x9p10019abcd1234efgh",
											"threadId": "cm4k2x9p10018abcd1234efgh",
											"parentId": "cm4k2x9p10019abcd1234efgh",
											"body": "Kan vi ändra startdatum till den 1 december?",
											"mentions": [
												"cm4k2x9p10002abcd1234efgh"
											],
											"createdAt": "2026-09-28T09:12:00.000Z",
											"editedAt": null,
											"deletedAt": null,
											"author": {
												"type": "USER",
												"id": "cm4k2x9p10002abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com"
											}
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Comment thread not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "thread"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"patch": {
				"description": "Toggle a thread between `OPEN` and `RESOLVED`.",
				"summary": "Resolve or reopen a comment thread",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "threadId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The comment thread ID.",
						"example": "cm4k2x9p10018abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "updateDocumentCommentThread",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"status": {
										"type": "string",
										"enum": [
											"OPEN",
											"RESOLVED"
										],
										"description": "Mark thread as resolved or reopen it"
									}
								},
								"required": [
									"status"
								]
							},
							"example": {
								"status": "OPEN"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The comment thread ID."
										},
										"documentId": {
											"type": [
												"string",
												"null"
											],
											"description": "The document ID."
										},
										"status": {
											"type": "string",
											"enum": [
												"OPEN",
												"RESOLVED"
											],
											"description": "Whether the thread is open or resolved."
										},
										"visibility": {
											"type": "string",
											"enum": [
												"INTERNAL",
												"SHARED"
											],
											"description": "If `SHARED`, every party on the document sees the thread. If `INTERNAL`, only the workspace does."
										},
										"excerpt": {
											"description": "The document text the thread refers to.",
											"type": [
												"string",
												"null"
											]
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the comment thread was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the comment thread was last updated."
										},
										"resolvedAt": {
											"description": "When the thread was resolved. Null while it's open.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"createdBy": {
											"description": "Who wrote it. Null when the author no longer exists.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The user ID."
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"email"
											],
											"additionalProperties": false
										},
										"resolvedBy": {
											"description": "Who wrote it. Null when the author no longer exists.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "The user ID."
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"name",
												"email"
											],
											"additionalProperties": false
										},
										"messages": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The message ID."
													},
													"threadId": {
														"type": "string",
														"description": "The comment thread ID."
													},
													"parentId": {
														"description": "The ID of the message this one replies to. Null for a top-level message.",
														"type": [
															"string",
															"null"
														]
													},
													"body": {
														"type": "string",
														"description": "The message text."
													},
													"mentions": {
														"type": "array",
														"items": {
															"type": "string"
														},
														"description": "IDs of the users the message mentions."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the message was created."
													},
													"editedAt": {
														"description": "When the message was last edited. Null if it never was.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"deletedAt": {
														"description": "When the message was deleted. Null if it wasn't.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"author": {
														"type": "object",
														"properties": {
															"type": {
																"type": "string",
																"enum": [
																	"USER",
																	"AI",
																	"SIGNER"
																],
																"description": "Whether a workspace member, the AI assistant, or a party wrote the message."
															},
															"id": {
																"description": "The user or party ID. Null for the AI assistant, or when the author no longer exists.",
																"type": [
																	"string",
																	"null"
																]
															},
															"name": {
																"type": [
																	"string",
																	"null"
																]
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"type",
															"id",
															"name",
															"email"
														],
														"additionalProperties": false,
														"description": "Who wrote the message."
													}
												},
												"required": [
													"id",
													"threadId",
													"parentId",
													"body",
													"mentions",
													"createdAt",
													"editedAt",
													"deletedAt",
													"author"
												],
												"additionalProperties": false
											},
											"description": "The thread's messages, oldest first."
										}
									},
									"required": [
										"id",
										"documentId",
										"status",
										"visibility",
										"excerpt",
										"createdAt",
										"updatedAt",
										"resolvedAt",
										"createdBy",
										"resolvedBy",
										"messages"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10018abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"status": "OPEN",
									"visibility": "INTERNAL",
									"excerpt": "Anställningen börjar den 1 november 2026",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"resolvedAt": null,
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"name": "Alex Berg",
										"email": "alex@example.com"
									},
									"resolvedBy": null,
									"messages": [
										{
											"id": "cm4k2x9p10019abcd1234efgh",
											"threadId": "cm4k2x9p10018abcd1234efgh",
											"parentId": "cm4k2x9p10019abcd1234efgh",
											"body": "Kan vi ändra startdatum till den 1 december?",
											"mentions": [
												"cm4k2x9p10002abcd1234efgh"
											],
											"createdAt": "2026-09-28T09:12:00.000Z",
											"editedAt": null,
											"deletedAt": null,
											"author": {
												"type": "USER",
												"id": "cm4k2x9p10002abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com"
											}
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "status",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Comment thread not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "thread"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"delete": {
				"description": "Permanently delete a comment thread and all its messages. Only the thread creator may delete it (AI-created threads are deletable by anyone with permission).",
				"summary": "Delete a comment thread",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "threadId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The comment thread ID.",
						"example": "cm4k2x9p10018abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteDocumentCommentThread",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The comment thread ID."
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the comment thread is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10018abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:delete",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:delete"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Comment thread not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "thread"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:delete"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/comments/{threadId}/messages": {
			"post": {
				"description": "Append a reply or new message to an existing comment thread on a document. Posting to a resolved thread will reopen it.",
				"summary": "Add a message to a comment thread",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "threadId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The comment thread ID.",
						"example": "cm4k2x9p10018abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "addDocumentCommentMessage",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"body": {
										"type": "string",
										"minLength": 1,
										"description": "Message body"
									},
									"parentMessageId": {
										"description": "Reply to a specific message in the thread",
										"type": [
											"string",
											"null"
										]
									},
									"mentions": {
										"description": "User IDs mentioned in the message",
										"type": "array",
										"items": {
											"type": "string"
										}
									}
								},
								"required": [
									"body"
								]
							},
							"example": {
								"body": "Kan vi ändra startdatum till den 1 december?",
								"parentMessageId": null,
								"mentions": [
									"cm4k2x9p10002abcd1234efgh"
								]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The message ID."
										},
										"threadId": {
											"type": "string",
											"description": "The comment thread ID."
										},
										"parentId": {
											"description": "The ID of the message this one replies to. Null for a top-level message.",
											"type": [
												"string",
												"null"
											]
										},
										"body": {
											"type": "string",
											"description": "The message text."
										},
										"mentions": {
											"type": "array",
											"items": {
												"type": "string"
											},
											"description": "IDs of the users the message mentions."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the message was created."
										},
										"editedAt": {
											"description": "When the message was last edited. Null if it never was.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"deletedAt": {
											"description": "When the message was deleted. Null if it wasn't.",
											"type": [
												"string",
												"null"
											],
											"format": "date-time"
										},
										"author": {
											"type": "object",
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"USER",
														"AI",
														"SIGNER"
													],
													"description": "Whether a workspace member, the AI assistant, or a party wrote the message."
												},
												"id": {
													"description": "The user or party ID. Null for the AI assistant, or when the author no longer exists.",
													"type": [
														"string",
														"null"
													]
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"type",
												"id",
												"name",
												"email"
											],
											"additionalProperties": false,
											"description": "Who wrote the message."
										}
									},
									"required": [
										"id",
										"threadId",
										"parentId",
										"body",
										"mentions",
										"createdAt",
										"editedAt",
										"deletedAt",
										"author"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10019abcd1234efgh",
									"threadId": "cm4k2x9p10018abcd1234efgh",
									"parentId": "cm4k2x9p10019abcd1234efgh",
									"body": "Kan vi ändra startdatum till den 1 december?",
									"mentions": [
										"cm4k2x9p10002abcd1234efgh"
									],
									"createdAt": "2026-09-28T09:12:00.000Z",
									"editedAt": null,
									"deletedAt": null,
									"author": {
										"type": "USER",
										"id": "cm4k2x9p10002abcd1234efgh",
										"name": "Alex Berg",
										"email": "alex@example.com"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "body",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Message not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "message"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/messages": {
			"get": {
				"description": "Returns a document's chat messages, newest first: external messages, which the parties see, and internal messages, which only the workspace sees. A party's private notes aren't included.",
				"summary": "List messages on a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentMessages",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The message ID."
													},
													"documentId": {
														"type": "string",
														"description": "The document ID."
													},
													"body": {
														"type": "string",
														"description": "The message text."
													},
													"internal": {
														"type": "boolean",
														"description": "true = internal (workspace-only); false = external (visible to signers, sends notifications)"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the message was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the message was last updated."
													},
													"author": {
														"description": "Who wrote the message. Null when the author no longer exists.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"type": {
																"type": "string",
																"enum": [
																	"USER",
																	"SIGNER"
																],
																"description": "Whether the author is a workspace member (USER) or a document signer (SIGNER)"
															},
															"id": {
																"type": "string",
																"description": "The user ID."
															},
															"name": {
																"type": [
																	"string",
																	"null"
																]
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"type",
															"id",
															"name",
															"email"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"id",
													"documentId",
													"body",
													"internal",
													"createdAt",
													"updatedAt",
													"author"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10019abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"body": "Kan vi ändra startdatum till den 1 december?",
											"internal": false,
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"author": {
												"type": "USER",
												"id": "cm4k2x9p10002abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com"
											}
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Message not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "message"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"post": {
				"description": "Posts a message to a document's chat. To keep it visible to the workspace only, set `internal` to `true`. Otherwise the message is external: the document's parties see it and get an email about it.",
				"summary": "Post a message to a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "createDocumentMessage",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"body": {
										"type": "string",
										"minLength": 1,
										"maxLength": 2000,
										"description": "The message text, up to 2,000 characters."
									},
									"internal": {
										"default": false,
										"description": "When true the message is internal (visible only to workspace members). When false (default) it is external — visible to the document signers and triggers their email notifications.",
										"type": "boolean"
									}
								},
								"required": [
									"body"
								]
							},
							"example": {
								"body": "Kan vi ändra startdatum till den 1 december?",
								"internal": false
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The message ID."
										},
										"documentId": {
											"type": "string",
											"description": "The document ID."
										},
										"body": {
											"type": "string",
											"description": "The message text."
										},
										"internal": {
											"type": "boolean",
											"description": "true = internal (workspace-only); false = external (visible to signers, sends notifications)"
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the message was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the message was last updated."
										},
										"author": {
											"description": "Who wrote the message. Null when the author no longer exists.",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"USER",
														"SIGNER"
													],
													"description": "Whether the author is a workspace member (USER) or a document signer (SIGNER)"
												},
												"id": {
													"type": "string",
													"description": "The user ID."
												},
												"name": {
													"type": [
														"string",
														"null"
													]
												},
												"email": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"type",
												"id",
												"name",
												"email"
											],
											"additionalProperties": false
										}
									},
									"required": [
										"id",
										"documentId",
										"body",
										"internal",
										"createdAt",
										"updatedAt",
										"author"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10019abcd1234efgh",
									"documentId": "cm4k2x9p10003abcd1234efgh",
									"body": "Kan vi ändra startdatum till den 1 december?",
									"internal": false,
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"author": {
										"type": "USER",
										"id": "cm4k2x9p10002abcd1234efgh",
										"name": "Alex Berg",
										"email": "alex@example.com"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received undefined",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "body",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received undefined"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Message not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "message"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		},
		"/api/v1/helpers/languages": {
			"get": {
				"description": "Returns the language codes supported by the platform for signing UI, emails, and document metadata.",
				"summary": "List supported languages",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "listLanguages",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "Stable machine code"
													},
													"label": {
														"type": "string",
														"description": "Human-readable label"
													}
												},
												"required": [
													"code",
													"label"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"code": "sv",
											"label": "Svenska"
										},
										{
											"code": "en",
											"label": "English"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/helpers/countries": {
			"get": {
				"description": "Returns every country a party can be in, as the ISO 3166-1 alpha-2 code that a party's `country` takes, with its English name.",
				"summary": "List countries",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "listCountries",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "Stable machine code"
													},
													"label": {
														"type": "string",
														"description": "Human-readable label"
													}
												},
												"required": [
													"code",
													"label"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"code": "NO",
											"label": "Norway"
										},
										{
											"code": "SE",
											"label": "Sweden"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/helpers/currencies": {
			"get": {
				"description": "Returns the supported currency codes (ISO 4217). Useful when modelling monetary contract values.",
				"summary": "List ISO 4217 currencies",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "listCurrencies",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "Stable machine code"
													},
													"label": {
														"type": "string",
														"description": "Human-readable label"
													}
												},
												"required": [
													"code",
													"label"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"code": "EUR",
											"label": "Euro"
										},
										{
											"code": "SEK",
											"label": "Swedish Krona"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/helpers/timezones": {
			"get": {
				"description": "Returns IANA timezone identifiers (e.g. `Europe/Stockholm`). Useful for scheduling, expiry, and reminder configuration.",
				"summary": "List IANA timezones",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "listTimezones",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "Stable machine code"
													},
													"label": {
														"type": "string",
														"description": "Human-readable label"
													}
												},
												"required": [
													"code",
													"label"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"code": "Europe/Oslo",
											"label": "Europe/Oslo"
										},
										{
											"code": "Europe/Stockholm",
											"label": "Europe/Stockholm"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/helpers/signature-methods": {
			"get": {
				"description": "Returns the signature methods you can offer a signer, with display labels — the generic methods plus every currently-available eID scheme.\n\nThis is the *pickable* set, not every accepted value. `NONE` and `MANUAL` are still accepted on `signatureMethod` but are omitted here because the app derives them rather than offering them: `NONE` is what a party gets when its role isn't a signing role, and `MANUAL` is for an imported archive document that was already signed on paper.\n\nBuild signature-method pickers from this rather than hard-coding the list: eID schemes are switched on per market over time, and sending a scheme that isn't available yet is rejected with *\"This eID scheme is not yet available\"*.\n\n`SE_BANKID` is Swedish BankID. API version `2026-09` calls it `BANKID`.",
				"summary": "List selectable signature methods",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "listSignatureMethods",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "Stable machine code"
													},
													"label": {
														"type": "string",
														"description": "Human-readable label"
													}
												},
												"required": [
													"code",
													"label"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"code": "SE_BANKID",
											"label": "BankID"
										},
										{
											"code": "DRAWING",
											"label": "Drawn signature"
										},
										{
											"code": "CLICK_TO_SIGN",
											"label": "Click to sign"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/helpers/two-step-verifications": {
			"get": {
				"description": "Returns the methods accepted by a party's `signVerification` and a document's `openVerification`, with display labels. `signVerification` runs before the party signs; `openVerification` runs before the document opens. null on either means no verification, so it isn't listed.\n\nSame rule as `/helpers/signature-methods`: build pickers from this rather than hard-coding, since the eID-backed methods become available as those schemes go live per market.",
				"summary": "List selectable verification methods",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "listTwoStepVerifications",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "Stable machine code"
													},
													"label": {
														"type": "string",
														"description": "Human-readable label"
													}
												},
												"required": [
													"code",
													"label"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"code": "SMS",
											"label": "SMS code"
										},
										{
											"code": "SE_BANKID",
											"label": "BankID"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires profile:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"profile:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"profile:read"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/reminders": {
			"post": {
				"description": "Send manual reminders to signers on a PENDING document.\n\nIf `partyIds` is omitted, a reminder is sent to every signer that has not yet signed and is eligible: the document has been sent to them, and they have an address for the channel.\n\n**Channel:** Each reminder goes out on the party's delivery method unless you set `channel` to `EMAIL` or `SMS`. A party without an address for that channel is skipped with reason `MISSING_EMAIL` or `MISSING_PHONE`. SMS reminders are billed like SMS invites.\n\n**Rate limiting:** Each signer can only receive one reminder per 24 hours. Signers that are rate-limited or otherwise not eligible are returned in the response with `status: SKIPPED` and a `reason`.",
				"summary": "Send reminders to one or more signers",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "sendDocumentReminders",
				"requestBody": {
					"description": "Body",
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"partyIds": {
										"description": "Specific party IDs to remind. Omit to remind every pending party on the document.",
										"type": "array",
										"items": {
											"type": "string"
										}
									},
									"channel": {
										"description": "Channel for the reminder. Defaults to each party's delivery method. A party without an address for the channel is skipped with reason `MISSING_EMAIL` or `MISSING_PHONE`. SMS reminders are billed like SMS invites.",
										"type": "string",
										"enum": [
											"EMAIL",
											"SMS"
										]
									}
								}
							},
							"example": {
								"partyIds": [
									"cm4k2x9p10004abcd1234efgh"
								],
								"channel": "EMAIL"
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"sent": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"skipped": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"failed": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"results": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"partyId": {
														"type": "string",
														"description": "The party ID."
													},
													"partyEmail": {
														"type": [
															"string",
															"null"
														]
													},
													"partyName": {
														"type": "string"
													},
													"status": {
														"type": "string",
														"enum": [
															"SENT",
															"SKIPPED",
															"FAILED"
														]
													},
													"reason": {
														"description": "Why the reminder was skipped or failed, if applicable",
														"type": [
															"string",
															"null"
														]
													}
												},
												"required": [
													"partyId",
													"partyEmail",
													"partyName",
													"status",
													"reason"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"sent",
										"skipped",
										"failed",
										"results"
									],
									"additionalProperties": false
								},
								"example": {
									"sent": 1,
									"skipped": 0,
									"failed": 0,
									"results": [
										{
											"partyId": "cm4k2x9p10004abcd1234efgh",
											"partyEmail": "kai@example.com",
											"partyName": "Kai Lindqvist",
											"status": "SENT",
											"reason": null
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Invalid input: expected string, received number",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "channel",
											"code": "INVALID_TYPE",
											"message": "Invalid input: expected string, received number"
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Reminder not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "reminder"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			},
			"get": {
				"description": "Returns all reminder events for a document (both manual and automatic), newest-first.",
				"summary": "List reminders sent for a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentReminders",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Audit log entry id"
													},
													"sentAt": {
														"type": "string",
														"format": "date-time"
													},
													"partyId": {
														"type": [
															"string",
															"null"
														],
														"description": "The party ID."
													},
													"partyEmail": {
														"type": [
															"string",
															"null"
														]
													},
													"partyName": {
														"type": [
															"string",
															"null"
														]
													},
													"channel": {
														"type": "string",
														"enum": [
															"EMAIL",
															"SMS"
														],
														"description": "Channel the reminder was sent on"
													},
													"triggeredBy": {
														"description": "A sajn user",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"id",
													"sentAt",
													"partyId",
													"partyEmail",
													"partyName",
													"channel",
													"triggeredBy"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10032abcd1234efgh",
											"sentAt": "2026-09-28T09:15:00.000Z",
											"partyId": "cm4k2x9p10004abcd1234efgh",
											"partyEmail": "kai@example.com",
											"partyName": "Kai Lindqvist",
											"channel": "EMAIL",
											"triggeredBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											}
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Reminder not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "reminder"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/organization": {
			"get": {
				"description": "Returns metadata for the organization that owns the API token's workspace — name, address, legal numbers, logo, and branding settings.",
				"summary": "Get the authenticated organization",
				"parameters": [
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getOrganization",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The organization ID."
										},
										"name": {
											"type": "string"
										},
										"orgName": {
											"type": [
												"string",
												"null"
											]
										},
										"orgNumber": {
											"type": [
												"string",
												"null"
											]
										},
										"country": {
											"type": [
												"string",
												"null"
											]
										},
										"email": {
											"type": [
												"string",
												"null"
											]
										},
										"phone": {
											"type": [
												"string",
												"null"
											]
										},
										"website": {
											"type": [
												"string",
												"null"
											]
										},
										"addressLine1": {
											"type": [
												"string",
												"null"
											]
										},
										"addressLine2": {
											"type": [
												"string",
												"null"
											]
										},
										"city": {
											"type": [
												"string",
												"null"
											]
										},
										"postalCode": {
											"type": [
												"string",
												"null"
											]
										},
										"vatNumber": {
											"type": [
												"string",
												"null"
											]
										},
										"logo": {
											"type": [
												"string",
												"null"
											]
										},
										"branding": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"enabled": {
													"type": "boolean"
												},
												"logo": {
													"type": [
														"string",
														"null"
													]
												},
												"icon": {
													"type": [
														"string",
														"null"
													]
												},
												"url": {
													"type": [
														"string",
														"null"
													]
												},
												"primaryColor": {
													"type": [
														"string",
														"null"
													]
												},
												"secondaryColor": {
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"enabled",
												"logo",
												"icon",
												"url",
												"primaryColor",
												"secondaryColor"
											],
											"additionalProperties": false
										},
										"apiVersion": {
											"description": "Default API version for requests without a `Sajn-Version` header. Null until the first API request sets it.",
											"type": [
												"string",
												"null"
											]
										},
										"language": {
											"type": "string",
											"enum": [
												"sv",
												"en",
												"no",
												"da",
												"fi",
												"de",
												"is",
												"es",
												"fr",
												"it"
											],
											"description": "Default language of the organization's documents and emails. A document or a user can set its own."
										},
										"currency": {
											"type": "string",
											"enum": [
												"SEK",
												"NOK",
												"DKK",
												"EUR"
											],
											"description": "ISO 4217 code of the currency the organization is billed in. Amounts such as `balance` in `GET /api/v1/limits` are in it."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the organization was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the organization was last updated."
										}
									},
									"required": [
										"id",
										"name",
										"orgName",
										"orgNumber",
										"country",
										"email",
										"phone",
										"website",
										"addressLine1",
										"addressLine2",
										"city",
										"postalCode",
										"vatNumber",
										"logo",
										"branding",
										"apiVersion",
										"language",
										"currency",
										"createdAt",
										"updatedAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10000abcd1234efgh",
									"name": "Exempelbolaget AB",
									"orgName": "Nordljus AB",
									"orgNumber": "5566778899",
									"country": "SE",
									"email": "hr@example.com",
									"phone": "+46701740605",
									"website": "https://example.com",
									"addressLine1": "Exempelgatan 1",
									"addressLine2": "",
									"city": "Stockholm",
									"postalCode": "11122",
									"vatNumber": "SE556677889901",
									"logo": "https://example.com/logotyp.png",
									"branding": {
										"enabled": true,
										"logo": "https://example.com/logotyp.png",
										"icon": "file-text",
										"url": "https://example.com/webhooks/sajn",
										"primaryColor": "#2563EB",
										"secondaryColor": "#0F172A"
									},
									"apiVersion": "2026-10",
									"language": "sv",
									"currency": "SEK",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires organization:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"organization:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"organization:read"
						]
					}
				]
			}
		},
		"/api/v1/webhooks/{id}/deliveries": {
			"get": {
				"description": "Returns a webhook's deliveries from the last 7 days, newest first. A delivery is one event sent to this endpoint, with every attempt to send it in `attempts`. Filter by `type` or `status`, or by `eventId` to see what happened to one event.",
				"summary": "List webhook deliveries",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "type",
						"in": "query",
						"description": "Filter by event type, such as `document.completed`. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"document.created",
									"document.sent",
									"document.fully_signed",
									"document.completed",
									"document.rejected",
									"document.expired",
									"document.withdrawn",
									"document.updated",
									"document.deleted",
									"document.restored",
									"document.archived",
									"document.unarchived",
									"document.expiration_extended",
									"document.expiring_soon",
									"document.party.sent",
									"document.party.delivery_failed",
									"document.party.opened",
									"document.party.read",
									"document.party.signed",
									"document.party.rejected",
									"document.party.delegated",
									"document.party.auth_failed",
									"document.party.verified",
									"document.party.updated",
									"document.party.added",
									"document.party.removed",
									"document.party.reminded",
									"document.comment.created",
									"bundle.sent",
									"bundle.party.signed",
									"bundle.completed",
									"bundle.cancelled",
									"archive_import.completed",
									"archive_import.undone",
									"identity_check.created",
									"identity_check.sent",
									"identity_check.opened",
									"identity_check.verified",
									"identity_check.failed",
									"identity_check.cancelled",
									"contact.created",
									"contact.updated",
									"contact.deleted",
									"company.created",
									"company.updated",
									"company.deleted",
									"template.created",
									"template.updated",
									"template.deleted",
									"template.restored",
									"form.submitted",
									"workspace.created",
									"member.added",
									"member.invited",
									"member.invite_accepted",
									"approval_request.created",
									"approval_request.approved",
									"approval_request.rejected",
									"approval_request.cancelled",
									"login.completed",
									"login.failed",
									"security.document_downloaded",
									"security.documents_exported",
									"security.signature_identity_accessed",
									"security.member_removed",
									"security.member_role_changed",
									"security.role_updated",
									"security.workspace_retention_updated",
									"usage.limit_reached",
									"webhook.test"
								]
							}
						}
					},
					{
						"name": "eventId",
						"in": "query",
						"description": "Only deliveries of this event, the `id` from `GET /api/v1/events`.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "status",
						"in": "query",
						"description": "Filter by delivery status: `SUCCESS`, `FAILED` or `PENDING`. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"SUCCESS",
									"FAILED",
									"PENDING"
								]
							}
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getWebhookDeliveries",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "ID of the delivery: one event sent to one endpoint, with every attempt to send it."
													},
													"webhookId": {
														"type": "string",
														"description": "The webhook ID."
													},
													"eventId": {
														"description": "ID of the event, as `GET /api/v1/events/:id` takes it. Null for a delivery made before sajn recorded it.",
														"type": [
															"string",
															"null"
														]
													},
													"type": {
														"description": "The event type, such as `document.completed`. Null for an event type that 2026-10 no longer has.",
														"type": [
															"string",
															"null"
														],
														"enum": [
															"document.created",
															"document.sent",
															"document.fully_signed",
															"document.completed",
															"document.rejected",
															"document.expired",
															"document.withdrawn",
															"document.updated",
															"document.deleted",
															"document.restored",
															"document.archived",
															"document.unarchived",
															"document.expiration_extended",
															"document.expiring_soon",
															"document.party.sent",
															"document.party.delivery_failed",
															"document.party.opened",
															"document.party.read",
															"document.party.signed",
															"document.party.rejected",
															"document.party.delegated",
															"document.party.auth_failed",
															"document.party.verified",
															"document.party.updated",
															"document.party.added",
															"document.party.removed",
															"document.party.reminded",
															"document.comment.created",
															"bundle.sent",
															"bundle.party.signed",
															"bundle.completed",
															"bundle.cancelled",
															"archive_import.completed",
															"archive_import.undone",
															"identity_check.created",
															"identity_check.sent",
															"identity_check.opened",
															"identity_check.verified",
															"identity_check.failed",
															"identity_check.cancelled",
															"contact.created",
															"contact.updated",
															"contact.deleted",
															"company.created",
															"company.updated",
															"company.deleted",
															"template.created",
															"template.updated",
															"template.deleted",
															"template.restored",
															"form.submitted",
															"workspace.created",
															"member.added",
															"member.invited",
															"member.invite_accepted",
															"approval_request.created",
															"approval_request.approved",
															"approval_request.rejected",
															"approval_request.cancelled",
															"login.completed",
															"login.failed",
															"security.document_downloaded",
															"security.documents_exported",
															"security.signature_identity_accessed",
															"security.member_removed",
															"security.member_role_changed",
															"security.role_updated",
															"security.workspace_retention_updated",
															"usage.limit_reached",
															"webhook.test",
															null
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"SUCCESS",
															"FAILED",
															"PENDING"
														],
														"description": "`SUCCESS` when an attempt got a 2xx answer, `FAILED` when sajn stopped retrying, and `PENDING` while attempts remain."
													},
													"url": {
														"type": "string",
														"description": "The endpoint URL the delivery was sent to."
													},
													"replayOfId": {
														"description": "ID of the delivery this one replays. Null for an original delivery.",
														"type": [
															"string",
															"null"
														]
													},
													"requestBody": {
														"type": "object",
														"description": "The JSON body sent to the endpoint, in the webhook's API version. Null until the first attempt.",
														"example": {
															"id": "cm4k2x9p10014abcd1234efgh",
															"type": "document.fully_signed",
															"createdAt": "2026-09-29T07:41:00.000Z",
															"apiVersion": "2026-10",
															"workspaceId": "cm4k2x9p10001abcd1234efgh",
															"environment": "PRODUCTION",
															"actor": null,
															"data": {
																"object": {
																	"id": "cm4k2x9p10003abcd1234efgh",
																	"externalId": "HR-2026-0142",
																	"expiresAt": "2026-10-28T22:00:00.000Z",
																	"name": "Anställningsavtal – Kai Lindqvist",
																	"status": "PENDING",
																	"documentMeta": {
																		"subject": "Ditt anställningsavtal från Exempelbolaget AB",
																		"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
																		"signingMode": "PARALLEL",
																		"forceReadFullDocument": true,
																		"showChatToSigners": false,
																		"language": "sv",
																		"value": null,
																		"redirectUrl": null,
																		"redirectEnabled": false,
																		"internalRecipients": [
																			"hr@example.com"
																		],
																		"signableAfterExpired": false,
																		"sendPlainTextEmailOnly": null,
																		"reminderIntervalDays": 3,
																		"allowDelegation": false,
																		"openVerification": null,
																		"aiChatEnabled": null,
																		"nationalIdDisplayMode": null,
																		"sameDeviceSigning": false,
																		"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
																	},
																	"createdAt": "2026-09-28T09:12:00.000Z",
																	"updatedAt": "2026-09-29T07:41:00.000Z",
																	"completedAt": null,
																	"deletedAt": null,
																	"templateId": "cm4k2x9p10008abcd1234efgh",
																	"folderId": "cm4k2x9p10011abcd1234efgh",
																	"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
																	"parties": [
																		{
																			"id": "cm4k2x9p10004abcd1234efgh",
																			"documentId": "cm4k2x9p10003abcd1234efgh",
																			"email": "kai@example.com",
																			"name": "Kai Lindqvist",
																			"phone": "+46701740605",
																			"type": "INDIVIDUAL",
																			"company": null,
																			"externalId": "EMP-0142",
																			"contactId": "cm4k2x9p10006abcd1234efgh",
																			"nationalId": null,
																			"country": "SE",
																			"role": "SIGNER",
																			"signingOrder": 1,
																			"signedAt": "2026-09-29T07:41:00.000Z",
																			"readStatus": "READ",
																			"signingStatus": "SIGNED",
																			"delivery": [
																				"EMAIL"
																			],
																			"signatureMethod": "SE_BANKID",
																			"signVerification": null,
																			"openVerification": null,
																			"sendStatus": "DELIVERED",
																			"identityVerified": true,
																			"identityMismatch": false,
																			"createdAt": "2026-09-28T09:12:00.000Z"
																		}
																	],
																	"tags": [],
																	"customFields": [],
																	"content": null,
																	"productTables": [],
																	"approvalRequestId": null,
																	"bundleId": null
																}
															}
														}
													},
													"attempts": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The webhook delivery ID."
																},
																"attempt": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991,
																	"description": "The attempt number, from 1. 0 for a delivery held back while the webhook was paused."
																},
																"status": {
																	"type": "string",
																	"enum": [
																		"SUCCESS",
																		"FAILED"
																	],
																	"description": "If `SUCCESS`, the endpoint answered with a 2xx status code."
																},
																"responseCode": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991,
																	"description": "The HTTP status code the endpoint answered with, or 0 when no response arrived."
																},
																"durationMs": {
																	"description": "How long the request took, in milliseconds. Null when sajn didn't send it, such as while the webhook was paused.",
																	"type": [
																		"integer",
																		"null"
																	],
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"requestHeaders": {
																	"description": "The headers sajn sent. Null when sajn didn't send the request.",
																	"type": [
																		"object",
																		"null"
																	],
																	"additionalProperties": {
																		"type": "string"
																	}
																},
																"responseHeaders": {
																	"description": "The headers the endpoint answered with. Null when no response arrived.",
																	"type": [
																		"object",
																		"null"
																	],
																	"additionalProperties": {
																		"type": "string"
																	}
																},
																"responseBody": {
																	"anyOf": [
																		{},
																		{
																			"type": "null"
																		}
																	],
																	"description": "What the endpoint answered: the parsed JSON body, the text of a non-JSON body, or the network error when the request failed."
																},
																"createdAt": {
																	"type": "string",
																	"format": "date-time",
																	"description": "When the webhook delivery was created."
																}
															},
															"required": [
																"id",
																"attempt",
																"status",
																"responseCode",
																"durationMs",
																"requestHeaders",
																"responseHeaders",
																"responseBody",
																"createdAt"
															],
															"additionalProperties": false
														},
														"description": "Every attempt, oldest first. Empty until the first attempt."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the webhook delivery was created."
													}
												},
												"required": [
													"id",
													"webhookId",
													"eventId",
													"type",
													"status",
													"url",
													"replayOfId",
													"requestBody",
													"attempts",
													"createdAt"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10015abcd1234efgh",
											"webhookId": "cm4k2x9p10013abcd1234efgh",
											"eventId": "cm4k2x9p10014abcd1234efgh",
											"type": "document.created",
											"status": "SUCCESS",
											"url": "https://example.com/webhooks/sajn",
											"replayOfId": null,
											"requestBody": {
												"id": "cm4k2x9p10014abcd1234efgh",
												"type": "document.fully_signed",
												"createdAt": "2026-09-29T07:41:00.000Z",
												"apiVersion": "2026-10",
												"workspaceId": "cm4k2x9p10001abcd1234efgh",
												"environment": "PRODUCTION",
												"actor": null,
												"data": {
													"object": {
														"id": "cm4k2x9p10003abcd1234efgh",
														"externalId": "HR-2026-0142",
														"expiresAt": "2026-10-28T22:00:00.000Z",
														"name": "Anställningsavtal – Kai Lindqvist",
														"status": "PENDING",
														"documentMeta": {
															"subject": "Ditt anställningsavtal från Exempelbolaget AB",
															"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
															"signingMode": "PARALLEL",
															"forceReadFullDocument": true,
															"showChatToSigners": false,
															"language": "sv",
															"value": null,
															"redirectUrl": null,
															"redirectEnabled": false,
															"internalRecipients": [
																"hr@example.com"
															],
															"signableAfterExpired": false,
															"sendPlainTextEmailOnly": null,
															"reminderIntervalDays": 3,
															"allowDelegation": false,
															"openVerification": null,
															"aiChatEnabled": null,
															"nationalIdDisplayMode": null,
															"sameDeviceSigning": false,
															"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
														},
														"createdAt": "2026-09-28T09:12:00.000Z",
														"updatedAt": "2026-09-29T07:41:00.000Z",
														"completedAt": null,
														"deletedAt": null,
														"templateId": "cm4k2x9p10008abcd1234efgh",
														"folderId": "cm4k2x9p10011abcd1234efgh",
														"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
														"parties": [
															{
																"id": "cm4k2x9p10004abcd1234efgh",
																"documentId": "cm4k2x9p10003abcd1234efgh",
																"email": "kai@example.com",
																"name": "Kai Lindqvist",
																"phone": "+46701740605",
																"type": "INDIVIDUAL",
																"company": null,
																"externalId": "EMP-0142",
																"contactId": "cm4k2x9p10006abcd1234efgh",
																"nationalId": null,
																"country": "SE",
																"role": "SIGNER",
																"signingOrder": 1,
																"signedAt": "2026-09-29T07:41:00.000Z",
																"readStatus": "READ",
																"signingStatus": "SIGNED",
																"delivery": [
																	"EMAIL"
																],
																"signatureMethod": "SE_BANKID",
																"signVerification": null,
																"openVerification": null,
																"sendStatus": "DELIVERED",
																"identityVerified": true,
																"identityMismatch": false,
																"createdAt": "2026-09-28T09:12:00.000Z"
															}
														],
														"tags": [],
														"customFields": [],
														"content": null,
														"productTables": [],
														"approvalRequestId": null,
														"bundleId": null
													}
												}
											},
											"attempts": [
												{
													"id": "cm4k2x9p10015abcd1234efgh",
													"attempt": 1,
													"status": "SUCCESS",
													"responseCode": 200,
													"durationMs": 1,
													"requestHeaders": {
														"startdatum": "Anställningsavtal – Kai Lindqvist"
													},
													"responseHeaders": {
														"startdatum": "Anställningsavtal – Kai Lindqvist"
													},
													"responseBody": null,
													"createdAt": "2026-09-28T09:12:00.000Z"
												}
											],
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook delivery not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "delivery"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:read"
						]
					}
				]
			}
		},
		"/api/v1/events": {
			"get": {
				"description": "Returns every event the workspace emitted in the last 30 days, newest first, whether or not a webhook was subscribed to it. Each event is the object a webhook delivery on your API version carries as its body.\n\nIf a webhook on API version `2026-10` was subscribed to the event type when the event happened, `data.object` is a snapshot from that moment. Otherwise sajn didn't record the object, and `data.object` is the resource as it is when you read the event. An event whose resource no longer exists is left out, so a page can hold fewer than `limit` events.\n\nPagination is keyset: follow `nextCursor` until it is `null`. New events arriving while you page never shift the window, so a full walk with `createdAfter` set to your last known timestamp is a complete reconcile even though webhooks are delivered at least once.",
				"summary": "List events",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "type",
						"in": "query",
						"description": "Filter by event type, such as `document.completed`. Comma-separated or repeated.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"document.created",
									"document.sent",
									"document.fully_signed",
									"document.completed",
									"document.rejected",
									"document.expired",
									"document.withdrawn",
									"document.updated",
									"document.deleted",
									"document.restored",
									"document.archived",
									"document.unarchived",
									"document.expiration_extended",
									"document.expiring_soon",
									"document.party.sent",
									"document.party.delivery_failed",
									"document.party.opened",
									"document.party.read",
									"document.party.signed",
									"document.party.rejected",
									"document.party.delegated",
									"document.party.auth_failed",
									"document.party.verified",
									"document.party.updated",
									"document.party.added",
									"document.party.removed",
									"document.party.reminded",
									"document.comment.created",
									"bundle.sent",
									"bundle.party.signed",
									"bundle.completed",
									"bundle.cancelled",
									"archive_import.completed",
									"archive_import.undone",
									"identity_check.created",
									"identity_check.sent",
									"identity_check.opened",
									"identity_check.verified",
									"identity_check.failed",
									"identity_check.cancelled",
									"contact.created",
									"contact.updated",
									"contact.deleted",
									"company.created",
									"company.updated",
									"company.deleted",
									"template.created",
									"template.updated",
									"template.deleted",
									"template.restored",
									"form.submitted",
									"workspace.created",
									"member.added",
									"member.invited",
									"member.invite_accepted",
									"approval_request.created",
									"approval_request.approved",
									"approval_request.rejected",
									"approval_request.cancelled",
									"login.completed",
									"login.failed",
									"security.document_downloaded",
									"security.documents_exported",
									"security.signature_identity_accessed",
									"security.member_removed",
									"security.member_role_changed",
									"security.role_updated",
									"security.workspace_retention_updated",
									"usage.limit_reached"
								]
							}
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only events created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only events created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getEvents",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "Event ID. Every delivery of the event carries it in the body and the `webhook-id` header."
													},
													"type": {
														"type": "string",
														"enum": [
															"document.created",
															"document.sent",
															"document.fully_signed",
															"document.completed",
															"document.rejected",
															"document.expired",
															"document.withdrawn",
															"document.updated",
															"document.deleted",
															"document.restored",
															"document.archived",
															"document.unarchived",
															"document.expiration_extended",
															"document.expiring_soon",
															"document.party.sent",
															"document.party.delivery_failed",
															"document.party.opened",
															"document.party.read",
															"document.party.signed",
															"document.party.rejected",
															"document.party.delegated",
															"document.party.auth_failed",
															"document.party.verified",
															"document.party.updated",
															"document.party.added",
															"document.party.removed",
															"document.party.reminded",
															"document.comment.created",
															"bundle.sent",
															"bundle.party.signed",
															"bundle.completed",
															"bundle.cancelled",
															"archive_import.completed",
															"archive_import.undone",
															"identity_check.created",
															"identity_check.sent",
															"identity_check.opened",
															"identity_check.verified",
															"identity_check.failed",
															"identity_check.cancelled",
															"contact.created",
															"contact.updated",
															"contact.deleted",
															"company.created",
															"company.updated",
															"company.deleted",
															"template.created",
															"template.updated",
															"template.deleted",
															"template.restored",
															"form.submitted",
															"workspace.created",
															"member.added",
															"member.invited",
															"member.invite_accepted",
															"approval_request.created",
															"approval_request.approved",
															"approval_request.rejected",
															"approval_request.cancelled",
															"login.completed",
															"login.failed",
															"security.document_downloaded",
															"security.documents_exported",
															"security.signature_identity_accessed",
															"security.member_removed",
															"security.member_role_changed",
															"security.role_updated",
															"security.workspace_retention_updated",
															"usage.limit_reached"
														],
														"description": "The event type, such as `document.completed`."
													},
													"createdAt": {
														"description": "When the event happened.",
														"type": "string",
														"format": "date-time"
													},
													"apiVersion": {
														"type": "string",
														"description": "The API version that sets the shape of `data`."
													},
													"workspaceId": {
														"type": "string",
														"description": "The workspace ID."
													},
													"organizationId": {
														"type": "string",
														"description": "The organization the event happened in."
													},
													"environment": {
														"type": "string",
														"enum": [
															"PRODUCTION",
															"SANDBOX"
														],
														"description": "`SANDBOX` for an event in a sandbox organization."
													},
													"actor": {
														"type": [
															"object",
															"null"
														],
														"properties": {
															"type": {
																"type": "string",
																"enum": [
																	"USER",
																	"API_KEY",
																	"OAUTH_APP",
																	"SYSTEM"
																],
																"description": "`USER` for a member, `API_KEY` for an API key, `OAUTH_APP` for an OAuth application, and `SYSTEM` for sajn itself, such as a scheduled reminder."
															},
															"id": {
																"description": "ID of the user, API key or OAuth application. Null for `SYSTEM`.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"type",
															"id"
														],
														"additionalProperties": false,
														"description": "Who caused the event. Null when sajn can't attribute it: a party's action, such as signing, and most changes made in the sajn app."
													},
													"data": {
														"type": "object",
														"description": "The event's data, the same object a webhook delivery carries. `object` is the resource the event is about; the other fields depend on `type`.",
														"example": {
															"object": {
																"id": "cm4k2x9p10003abcd1234efgh",
																"externalId": "HR-2026-0142",
																"expiresAt": "2026-10-28T22:00:00.000Z",
																"name": "Anställningsavtal – Kai Lindqvist",
																"status": "PENDING",
																"documentMeta": {
																	"subject": "Ditt anställningsavtal från Exempelbolaget AB",
																	"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
																	"signingMode": "PARALLEL",
																	"forceReadFullDocument": true,
																	"showChatToSigners": false,
																	"language": "sv",
																	"value": null,
																	"redirectUrl": null,
																	"redirectEnabled": false,
																	"internalRecipients": [
																		"hr@example.com"
																	],
																	"signableAfterExpired": false,
																	"sendPlainTextEmailOnly": null,
																	"reminderIntervalDays": 3,
																	"allowDelegation": false,
																	"openVerification": null,
																	"aiChatEnabled": null,
																	"nationalIdDisplayMode": null,
																	"sameDeviceSigning": false,
																	"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
																},
																"createdAt": "2026-09-28T09:12:00.000Z",
																"updatedAt": "2026-09-29T07:41:00.000Z",
																"completedAt": null,
																"deletedAt": null,
																"templateId": "cm4k2x9p10008abcd1234efgh",
																"folderId": "cm4k2x9p10011abcd1234efgh",
																"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
																"parties": [
																	{
																		"id": "cm4k2x9p10004abcd1234efgh",
																		"documentId": "cm4k2x9p10003abcd1234efgh",
																		"email": "kai@example.com",
																		"name": "Kai Lindqvist",
																		"phone": "+46701740605",
																		"type": "INDIVIDUAL",
																		"company": null,
																		"externalId": "EMP-0142",
																		"contactId": "cm4k2x9p10006abcd1234efgh",
																		"nationalId": null,
																		"country": "SE",
																		"role": "SIGNER",
																		"signingOrder": 1,
																		"signedAt": "2026-09-29T07:41:00.000Z",
																		"readStatus": "READ",
																		"signingStatus": "SIGNED",
																		"delivery": [
																			"EMAIL"
																		],
																		"signatureMethod": "SE_BANKID",
																		"signVerification": null,
																		"openVerification": null,
																		"sendStatus": "DELIVERED",
																		"identityVerified": true,
																		"identityMismatch": false,
																		"createdAt": "2026-09-28T09:12:00.000Z"
																	}
																],
																"tags": [],
																"customFields": [],
																"content": null,
																"productTables": [],
																"approvalRequestId": null,
																"bundleId": null
															}
														}
													}
												},
												"required": [
													"id",
													"type",
													"createdAt",
													"apiVersion",
													"workspaceId",
													"organizationId",
													"environment",
													"actor",
													"data"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10014abcd1234efgh",
											"type": "document.created",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"apiVersion": "2026-10",
											"workspaceId": "cm4k2x9p10001abcd1234efgh",
											"organizationId": "cm4k2x9p10000abcd1234efgh",
											"environment": "PRODUCTION",
											"actor": {
												"type": "USER",
												"id": "cm4k2x9p10014abcd1234efgh"
											},
											"data": {
												"partyId": "cm4k2x9p10004abcd1234efgh",
												"signatureType": "SE_BANKID"
											}
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:read"
						]
					}
				]
			}
		},
		"/api/v1/events/{id}": {
			"get": {
				"description": "Returns a single event, the same object a webhook delivery carries as its body. Use it to read an event again by the `webhook-id` of a delivery. `data.object` follows the same snapshot rule as `GET /api/v1/events`, and an event whose resource no longer exists returns `404`.",
				"summary": "Get an event",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The event ID.",
						"example": "cm4k2x9p10014abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getEvent",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "Event ID. Every delivery of the event carries it in the body and the `webhook-id` header."
										},
										"type": {
											"type": "string",
											"enum": [
												"document.created",
												"document.sent",
												"document.fully_signed",
												"document.completed",
												"document.rejected",
												"document.expired",
												"document.withdrawn",
												"document.updated",
												"document.deleted",
												"document.restored",
												"document.archived",
												"document.unarchived",
												"document.expiration_extended",
												"document.expiring_soon",
												"document.party.sent",
												"document.party.delivery_failed",
												"document.party.opened",
												"document.party.read",
												"document.party.signed",
												"document.party.rejected",
												"document.party.delegated",
												"document.party.auth_failed",
												"document.party.verified",
												"document.party.updated",
												"document.party.added",
												"document.party.removed",
												"document.party.reminded",
												"document.comment.created",
												"bundle.sent",
												"bundle.party.signed",
												"bundle.completed",
												"bundle.cancelled",
												"archive_import.completed",
												"archive_import.undone",
												"identity_check.created",
												"identity_check.sent",
												"identity_check.opened",
												"identity_check.verified",
												"identity_check.failed",
												"identity_check.cancelled",
												"contact.created",
												"contact.updated",
												"contact.deleted",
												"company.created",
												"company.updated",
												"company.deleted",
												"template.created",
												"template.updated",
												"template.deleted",
												"template.restored",
												"form.submitted",
												"workspace.created",
												"member.added",
												"member.invited",
												"member.invite_accepted",
												"approval_request.created",
												"approval_request.approved",
												"approval_request.rejected",
												"approval_request.cancelled",
												"login.completed",
												"login.failed",
												"security.document_downloaded",
												"security.documents_exported",
												"security.signature_identity_accessed",
												"security.member_removed",
												"security.member_role_changed",
												"security.role_updated",
												"security.workspace_retention_updated",
												"usage.limit_reached"
											],
											"description": "The event type, such as `document.completed`."
										},
										"createdAt": {
											"description": "When the event happened.",
											"type": "string",
											"format": "date-time"
										},
										"apiVersion": {
											"type": "string",
											"description": "The API version that sets the shape of `data`."
										},
										"workspaceId": {
											"type": "string",
											"description": "The workspace ID."
										},
										"organizationId": {
											"type": "string",
											"description": "The organization the event happened in."
										},
										"environment": {
											"type": "string",
											"enum": [
												"PRODUCTION",
												"SANDBOX"
											],
											"description": "`SANDBOX` for an event in a sandbox organization."
										},
										"actor": {
											"type": [
												"object",
												"null"
											],
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"USER",
														"API_KEY",
														"OAUTH_APP",
														"SYSTEM"
													],
													"description": "`USER` for a member, `API_KEY` for an API key, `OAUTH_APP` for an OAuth application, and `SYSTEM` for sajn itself, such as a scheduled reminder."
												},
												"id": {
													"description": "ID of the user, API key or OAuth application. Null for `SYSTEM`.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"type",
												"id"
											],
											"additionalProperties": false,
											"description": "Who caused the event. Null when sajn can't attribute it: a party's action, such as signing, and most changes made in the sajn app."
										},
										"data": {
											"type": "object",
											"description": "The event's data, the same object a webhook delivery carries. `object` is the resource the event is about; the other fields depend on `type`.",
											"example": {
												"object": {
													"id": "cm4k2x9p10003abcd1234efgh",
													"externalId": "HR-2026-0142",
													"expiresAt": "2026-10-28T22:00:00.000Z",
													"name": "Anställningsavtal – Kai Lindqvist",
													"status": "PENDING",
													"documentMeta": {
														"subject": "Ditt anställningsavtal från Exempelbolaget AB",
														"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
														"signingMode": "PARALLEL",
														"forceReadFullDocument": true,
														"showChatToSigners": false,
														"language": "sv",
														"value": null,
														"redirectUrl": null,
														"redirectEnabled": false,
														"internalRecipients": [
															"hr@example.com"
														],
														"signableAfterExpired": false,
														"sendPlainTextEmailOnly": null,
														"reminderIntervalDays": 3,
														"allowDelegation": false,
														"openVerification": null,
														"aiChatEnabled": null,
														"nationalIdDisplayMode": null,
														"sameDeviceSigning": false,
														"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
													},
													"createdAt": "2026-09-28T09:12:00.000Z",
													"updatedAt": "2026-09-29T07:41:00.000Z",
													"completedAt": null,
													"deletedAt": null,
													"templateId": "cm4k2x9p10008abcd1234efgh",
													"folderId": "cm4k2x9p10011abcd1234efgh",
													"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
													"parties": [
														{
															"id": "cm4k2x9p10004abcd1234efgh",
															"documentId": "cm4k2x9p10003abcd1234efgh",
															"email": "kai@example.com",
															"name": "Kai Lindqvist",
															"phone": "+46701740605",
															"type": "INDIVIDUAL",
															"company": null,
															"externalId": "EMP-0142",
															"contactId": "cm4k2x9p10006abcd1234efgh",
															"nationalId": null,
															"country": "SE",
															"role": "SIGNER",
															"signingOrder": 1,
															"signedAt": "2026-09-29T07:41:00.000Z",
															"readStatus": "READ",
															"signingStatus": "SIGNED",
															"delivery": [
																"EMAIL"
															],
															"signatureMethod": "SE_BANKID",
															"signVerification": null,
															"openVerification": null,
															"sendStatus": "DELIVERED",
															"identityVerified": true,
															"identityMismatch": false,
															"createdAt": "2026-09-28T09:12:00.000Z"
														}
													],
													"tags": [],
													"customFields": [],
													"content": null,
													"productTables": [],
													"approvalRequestId": null,
													"bundleId": null
												}
											}
										}
									},
									"required": [
										"id",
										"type",
										"createdAt",
										"apiVersion",
										"workspaceId",
										"organizationId",
										"environment",
										"actor",
										"data"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10014abcd1234efgh",
									"type": "document.created",
									"createdAt": "2026-09-28T09:12:00.000Z",
									"apiVersion": "2026-10",
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"environment": "PRODUCTION",
									"actor": {
										"type": "USER",
										"id": "cm4k2x9p10014abcd1234efgh"
									},
									"data": {
										"partyId": "cm4k2x9p10004abcd1234efgh",
										"signatureType": "SE_BANKID"
									}
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Event not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "event"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:read"
						]
					}
				]
			}
		},
		"/api/v1/webhooks/{id}/deliveries/{deliveryId}": {
			"get": {
				"description": "Returns a webhook delivery with every attempt, including the request and response headers and bodies.",
				"summary": "Get a single webhook delivery",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "deliveryId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook delivery ID.",
						"example": "cm4k2x9p10015abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getWebhookDelivery",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the delivery: one event sent to one endpoint, with every attempt to send it."
										},
										"webhookId": {
											"type": "string",
											"description": "The webhook ID."
										},
										"eventId": {
											"description": "ID of the event, as `GET /api/v1/events/:id` takes it. Null for a delivery made before sajn recorded it.",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"description": "The event type, such as `document.completed`. Null for an event type that 2026-10 no longer has.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"document.created",
												"document.sent",
												"document.fully_signed",
												"document.completed",
												"document.rejected",
												"document.expired",
												"document.withdrawn",
												"document.updated",
												"document.deleted",
												"document.restored",
												"document.archived",
												"document.unarchived",
												"document.expiration_extended",
												"document.expiring_soon",
												"document.party.sent",
												"document.party.delivery_failed",
												"document.party.opened",
												"document.party.read",
												"document.party.signed",
												"document.party.rejected",
												"document.party.delegated",
												"document.party.auth_failed",
												"document.party.verified",
												"document.party.updated",
												"document.party.added",
												"document.party.removed",
												"document.party.reminded",
												"document.comment.created",
												"bundle.sent",
												"bundle.party.signed",
												"bundle.completed",
												"bundle.cancelled",
												"archive_import.completed",
												"archive_import.undone",
												"identity_check.created",
												"identity_check.sent",
												"identity_check.opened",
												"identity_check.verified",
												"identity_check.failed",
												"identity_check.cancelled",
												"contact.created",
												"contact.updated",
												"contact.deleted",
												"company.created",
												"company.updated",
												"company.deleted",
												"template.created",
												"template.updated",
												"template.deleted",
												"template.restored",
												"form.submitted",
												"workspace.created",
												"member.added",
												"member.invited",
												"member.invite_accepted",
												"approval_request.created",
												"approval_request.approved",
												"approval_request.rejected",
												"approval_request.cancelled",
												"login.completed",
												"login.failed",
												"security.document_downloaded",
												"security.documents_exported",
												"security.signature_identity_accessed",
												"security.member_removed",
												"security.member_role_changed",
												"security.role_updated",
												"security.workspace_retention_updated",
												"usage.limit_reached",
												"webhook.test",
												null
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"SUCCESS",
												"FAILED",
												"PENDING"
											],
											"description": "`SUCCESS` when an attempt got a 2xx answer, `FAILED` when sajn stopped retrying, and `PENDING` while attempts remain."
										},
										"url": {
											"type": "string",
											"description": "The endpoint URL the delivery was sent to."
										},
										"replayOfId": {
											"description": "ID of the delivery this one replays. Null for an original delivery.",
											"type": [
												"string",
												"null"
											]
										},
										"requestBody": {
											"type": "object",
											"description": "The JSON body sent to the endpoint, in the webhook's API version. Null until the first attempt.",
											"example": {
												"id": "cm4k2x9p10014abcd1234efgh",
												"type": "document.fully_signed",
												"createdAt": "2026-09-29T07:41:00.000Z",
												"apiVersion": "2026-10",
												"workspaceId": "cm4k2x9p10001abcd1234efgh",
												"environment": "PRODUCTION",
												"actor": null,
												"data": {
													"object": {
														"id": "cm4k2x9p10003abcd1234efgh",
														"externalId": "HR-2026-0142",
														"expiresAt": "2026-10-28T22:00:00.000Z",
														"name": "Anställningsavtal – Kai Lindqvist",
														"status": "PENDING",
														"documentMeta": {
															"subject": "Ditt anställningsavtal från Exempelbolaget AB",
															"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
															"signingMode": "PARALLEL",
															"forceReadFullDocument": true,
															"showChatToSigners": false,
															"language": "sv",
															"value": null,
															"redirectUrl": null,
															"redirectEnabled": false,
															"internalRecipients": [
																"hr@example.com"
															],
															"signableAfterExpired": false,
															"sendPlainTextEmailOnly": null,
															"reminderIntervalDays": 3,
															"allowDelegation": false,
															"openVerification": null,
															"aiChatEnabled": null,
															"nationalIdDisplayMode": null,
															"sameDeviceSigning": false,
															"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
														},
														"createdAt": "2026-09-28T09:12:00.000Z",
														"updatedAt": "2026-09-29T07:41:00.000Z",
														"completedAt": null,
														"deletedAt": null,
														"templateId": "cm4k2x9p10008abcd1234efgh",
														"folderId": "cm4k2x9p10011abcd1234efgh",
														"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
														"parties": [
															{
																"id": "cm4k2x9p10004abcd1234efgh",
																"documentId": "cm4k2x9p10003abcd1234efgh",
																"email": "kai@example.com",
																"name": "Kai Lindqvist",
																"phone": "+46701740605",
																"type": "INDIVIDUAL",
																"company": null,
																"externalId": "EMP-0142",
																"contactId": "cm4k2x9p10006abcd1234efgh",
																"nationalId": null,
																"country": "SE",
																"role": "SIGNER",
																"signingOrder": 1,
																"signedAt": "2026-09-29T07:41:00.000Z",
																"readStatus": "READ",
																"signingStatus": "SIGNED",
																"delivery": [
																	"EMAIL"
																],
																"signatureMethod": "SE_BANKID",
																"signVerification": null,
																"openVerification": null,
																"sendStatus": "DELIVERED",
																"identityVerified": true,
																"identityMismatch": false,
																"createdAt": "2026-09-28T09:12:00.000Z"
															}
														],
														"tags": [],
														"customFields": [],
														"content": null,
														"productTables": [],
														"approvalRequestId": null,
														"bundleId": null
													}
												}
											}
										},
										"attempts": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The webhook delivery ID."
													},
													"attempt": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "The attempt number, from 1. 0 for a delivery held back while the webhook was paused."
													},
													"status": {
														"type": "string",
														"enum": [
															"SUCCESS",
															"FAILED"
														],
														"description": "If `SUCCESS`, the endpoint answered with a 2xx status code."
													},
													"responseCode": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "The HTTP status code the endpoint answered with, or 0 when no response arrived."
													},
													"durationMs": {
														"description": "How long the request took, in milliseconds. Null when sajn didn't send it, such as while the webhook was paused.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"requestHeaders": {
														"description": "The headers sajn sent. Null when sajn didn't send the request.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {
															"type": "string"
														}
													},
													"responseHeaders": {
														"description": "The headers the endpoint answered with. Null when no response arrived.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {
															"type": "string"
														}
													},
													"responseBody": {
														"anyOf": [
															{},
															{
																"type": "null"
															}
														],
														"description": "What the endpoint answered: the parsed JSON body, the text of a non-JSON body, or the network error when the request failed."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the webhook delivery was created."
													}
												},
												"required": [
													"id",
													"attempt",
													"status",
													"responseCode",
													"durationMs",
													"requestHeaders",
													"responseHeaders",
													"responseBody",
													"createdAt"
												],
												"additionalProperties": false
											},
											"description": "Every attempt, oldest first. Empty until the first attempt."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the webhook delivery was created."
										}
									},
									"required": [
										"id",
										"webhookId",
										"eventId",
										"type",
										"status",
										"url",
										"replayOfId",
										"requestBody",
										"attempts",
										"createdAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10015abcd1234efgh",
									"webhookId": "cm4k2x9p10013abcd1234efgh",
									"eventId": "cm4k2x9p10014abcd1234efgh",
									"type": "document.created",
									"status": "SUCCESS",
									"url": "https://example.com/webhooks/sajn",
									"replayOfId": null,
									"requestBody": {
										"id": "cm4k2x9p10014abcd1234efgh",
										"type": "document.fully_signed",
										"createdAt": "2026-09-29T07:41:00.000Z",
										"apiVersion": "2026-10",
										"workspaceId": "cm4k2x9p10001abcd1234efgh",
										"environment": "PRODUCTION",
										"actor": null,
										"data": {
											"object": {
												"id": "cm4k2x9p10003abcd1234efgh",
												"externalId": "HR-2026-0142",
												"expiresAt": "2026-10-28T22:00:00.000Z",
												"name": "Anställningsavtal – Kai Lindqvist",
												"status": "PENDING",
												"documentMeta": {
													"subject": "Ditt anställningsavtal från Exempelbolaget AB",
													"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
													"signingMode": "PARALLEL",
													"forceReadFullDocument": true,
													"showChatToSigners": false,
													"language": "sv",
													"value": null,
													"redirectUrl": null,
													"redirectEnabled": false,
													"internalRecipients": [
														"hr@example.com"
													],
													"signableAfterExpired": false,
													"sendPlainTextEmailOnly": null,
													"reminderIntervalDays": 3,
													"allowDelegation": false,
													"openVerification": null,
													"aiChatEnabled": null,
													"nationalIdDisplayMode": null,
													"sameDeviceSigning": false,
													"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
												},
												"createdAt": "2026-09-28T09:12:00.000Z",
												"updatedAt": "2026-09-29T07:41:00.000Z",
												"completedAt": null,
												"deletedAt": null,
												"templateId": "cm4k2x9p10008abcd1234efgh",
												"folderId": "cm4k2x9p10011abcd1234efgh",
												"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
												"parties": [
													{
														"id": "cm4k2x9p10004abcd1234efgh",
														"documentId": "cm4k2x9p10003abcd1234efgh",
														"email": "kai@example.com",
														"name": "Kai Lindqvist",
														"phone": "+46701740605",
														"type": "INDIVIDUAL",
														"company": null,
														"externalId": "EMP-0142",
														"contactId": "cm4k2x9p10006abcd1234efgh",
														"nationalId": null,
														"country": "SE",
														"role": "SIGNER",
														"signingOrder": 1,
														"signedAt": "2026-09-29T07:41:00.000Z",
														"readStatus": "READ",
														"signingStatus": "SIGNED",
														"delivery": [
															"EMAIL"
														],
														"signatureMethod": "SE_BANKID",
														"signVerification": null,
														"openVerification": null,
														"sendStatus": "DELIVERED",
														"identityVerified": true,
														"identityMismatch": false,
														"createdAt": "2026-09-28T09:12:00.000Z"
													}
												],
												"tags": [],
												"customFields": [],
												"content": null,
												"productTables": [],
												"approvalRequestId": null,
												"bundleId": null
											}
										}
									},
									"attempts": [
										{
											"id": "cm4k2x9p10015abcd1234efgh",
											"attempt": 1,
											"status": "SUCCESS",
											"responseCode": 200,
											"durationMs": 1,
											"requestHeaders": {
												"startdatum": "Anställningsavtal – Kai Lindqvist"
											},
											"responseHeaders": {
												"startdatum": "Anställningsavtal – Kai Lindqvist"
											},
											"responseBody": null,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook delivery not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "delivery"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:read"
						]
					}
				]
			}
		},
		"/api/v1/webhooks/{id}/deliveries/{deliveryId}/retry": {
			"post": {
				"description": "Sends a past delivery again, with the body it had, and returns the new delivery with `status: PENDING` and no attempts. Its `replayOfId` is this delivery's ID, and its attempts appear in `GET /api/v1/webhooks/:id/deliveries/:deliveryId` once sajn sends it. The event `id`, and so `webhook-id`, stays the same, so a receiver that deduplicates on it ignores the replay of an event it already processed.\n\nReturns `409 INVALID_STATE` when the webhook is disabled or paused, or the delivery is older than 7 days. Reactivate a paused webhook with `POST /api/v1/webhooks/:id/reactivate` first.",
				"summary": "Replay a webhook delivery",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook ID.",
						"example": "cm4k2x9p10013abcd1234efgh"
					},
					{
						"name": "deliveryId",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The webhook delivery ID.",
						"example": "cm4k2x9p10015abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "retryWebhookDelivery",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "ID of the delivery: one event sent to one endpoint, with every attempt to send it."
										},
										"webhookId": {
											"type": "string",
											"description": "The webhook ID."
										},
										"eventId": {
											"description": "ID of the event, as `GET /api/v1/events/:id` takes it. Null for a delivery made before sajn recorded it.",
											"type": [
												"string",
												"null"
											]
										},
										"type": {
											"description": "The event type, such as `document.completed`. Null for an event type that 2026-10 no longer has.",
											"type": [
												"string",
												"null"
											],
											"enum": [
												"document.created",
												"document.sent",
												"document.fully_signed",
												"document.completed",
												"document.rejected",
												"document.expired",
												"document.withdrawn",
												"document.updated",
												"document.deleted",
												"document.restored",
												"document.archived",
												"document.unarchived",
												"document.expiration_extended",
												"document.expiring_soon",
												"document.party.sent",
												"document.party.delivery_failed",
												"document.party.opened",
												"document.party.read",
												"document.party.signed",
												"document.party.rejected",
												"document.party.delegated",
												"document.party.auth_failed",
												"document.party.verified",
												"document.party.updated",
												"document.party.added",
												"document.party.removed",
												"document.party.reminded",
												"document.comment.created",
												"bundle.sent",
												"bundle.party.signed",
												"bundle.completed",
												"bundle.cancelled",
												"archive_import.completed",
												"archive_import.undone",
												"identity_check.created",
												"identity_check.sent",
												"identity_check.opened",
												"identity_check.verified",
												"identity_check.failed",
												"identity_check.cancelled",
												"contact.created",
												"contact.updated",
												"contact.deleted",
												"company.created",
												"company.updated",
												"company.deleted",
												"template.created",
												"template.updated",
												"template.deleted",
												"template.restored",
												"form.submitted",
												"workspace.created",
												"member.added",
												"member.invited",
												"member.invite_accepted",
												"approval_request.created",
												"approval_request.approved",
												"approval_request.rejected",
												"approval_request.cancelled",
												"login.completed",
												"login.failed",
												"security.document_downloaded",
												"security.documents_exported",
												"security.signature_identity_accessed",
												"security.member_removed",
												"security.member_role_changed",
												"security.role_updated",
												"security.workspace_retention_updated",
												"usage.limit_reached",
												"webhook.test",
												null
											]
										},
										"status": {
											"type": "string",
											"enum": [
												"SUCCESS",
												"FAILED",
												"PENDING"
											],
											"description": "`SUCCESS` when an attempt got a 2xx answer, `FAILED` when sajn stopped retrying, and `PENDING` while attempts remain."
										},
										"url": {
											"type": "string",
											"description": "The endpoint URL the delivery was sent to."
										},
										"replayOfId": {
											"description": "ID of the delivery this one replays. Null for an original delivery.",
											"type": [
												"string",
												"null"
											]
										},
										"requestBody": {
											"type": "object",
											"description": "The JSON body sent to the endpoint, in the webhook's API version. Null until the first attempt.",
											"example": {
												"id": "cm4k2x9p10014abcd1234efgh",
												"type": "document.fully_signed",
												"createdAt": "2026-09-29T07:41:00.000Z",
												"apiVersion": "2026-10",
												"workspaceId": "cm4k2x9p10001abcd1234efgh",
												"environment": "PRODUCTION",
												"actor": null,
												"data": {
													"object": {
														"id": "cm4k2x9p10003abcd1234efgh",
														"externalId": "HR-2026-0142",
														"expiresAt": "2026-10-28T22:00:00.000Z",
														"name": "Anställningsavtal – Kai Lindqvist",
														"status": "PENDING",
														"documentMeta": {
															"subject": "Ditt anställningsavtal från Exempelbolaget AB",
															"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
															"signingMode": "PARALLEL",
															"forceReadFullDocument": true,
															"showChatToSigners": false,
															"language": "sv",
															"value": null,
															"redirectUrl": null,
															"redirectEnabled": false,
															"internalRecipients": [
																"hr@example.com"
															],
															"signableAfterExpired": false,
															"sendPlainTextEmailOnly": null,
															"reminderIntervalDays": 3,
															"allowDelegation": false,
															"openVerification": null,
															"aiChatEnabled": null,
															"nationalIdDisplayMode": null,
															"sameDeviceSigning": false,
															"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
														},
														"createdAt": "2026-09-28T09:12:00.000Z",
														"updatedAt": "2026-09-29T07:41:00.000Z",
														"completedAt": null,
														"deletedAt": null,
														"templateId": "cm4k2x9p10008abcd1234efgh",
														"folderId": "cm4k2x9p10011abcd1234efgh",
														"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
														"parties": [
															{
																"id": "cm4k2x9p10004abcd1234efgh",
																"documentId": "cm4k2x9p10003abcd1234efgh",
																"email": "kai@example.com",
																"name": "Kai Lindqvist",
																"phone": "+46701740605",
																"type": "INDIVIDUAL",
																"company": null,
																"externalId": "EMP-0142",
																"contactId": "cm4k2x9p10006abcd1234efgh",
																"nationalId": null,
																"country": "SE",
																"role": "SIGNER",
																"signingOrder": 1,
																"signedAt": "2026-09-29T07:41:00.000Z",
																"readStatus": "READ",
																"signingStatus": "SIGNED",
																"delivery": [
																	"EMAIL"
																],
																"signatureMethod": "SE_BANKID",
																"signVerification": null,
																"openVerification": null,
																"sendStatus": "DELIVERED",
																"identityVerified": true,
																"identityMismatch": false,
																"createdAt": "2026-09-28T09:12:00.000Z"
															}
														],
														"tags": [],
														"customFields": [],
														"content": null,
														"productTables": [],
														"approvalRequestId": null,
														"bundleId": null
													}
												}
											}
										},
										"attempts": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The webhook delivery ID."
													},
													"attempt": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "The attempt number, from 1. 0 for a delivery held back while the webhook was paused."
													},
													"status": {
														"type": "string",
														"enum": [
															"SUCCESS",
															"FAILED"
														],
														"description": "If `SUCCESS`, the endpoint answered with a 2xx status code."
													},
													"responseCode": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991,
														"description": "The HTTP status code the endpoint answered with, or 0 when no response arrived."
													},
													"durationMs": {
														"description": "How long the request took, in milliseconds. Null when sajn didn't send it, such as while the webhook was paused.",
														"type": [
															"integer",
															"null"
														],
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"requestHeaders": {
														"description": "The headers sajn sent. Null when sajn didn't send the request.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {
															"type": "string"
														}
													},
													"responseHeaders": {
														"description": "The headers the endpoint answered with. Null when no response arrived.",
														"type": [
															"object",
															"null"
														],
														"additionalProperties": {
															"type": "string"
														}
													},
													"responseBody": {
														"anyOf": [
															{},
															{
																"type": "null"
															}
														],
														"description": "What the endpoint answered: the parsed JSON body, the text of a non-JSON body, or the network error when the request failed."
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the webhook delivery was created."
													}
												},
												"required": [
													"id",
													"attempt",
													"status",
													"responseCode",
													"durationMs",
													"requestHeaders",
													"responseHeaders",
													"responseBody",
													"createdAt"
												],
												"additionalProperties": false
											},
											"description": "Every attempt, oldest first. Empty until the first attempt."
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the webhook delivery was created."
										}
									},
									"required": [
										"id",
										"webhookId",
										"eventId",
										"type",
										"status",
										"url",
										"replayOfId",
										"requestBody",
										"attempts",
										"createdAt"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10015abcd1234efgh",
									"webhookId": "cm4k2x9p10013abcd1234efgh",
									"eventId": "cm4k2x9p10014abcd1234efgh",
									"type": "document.created",
									"status": "SUCCESS",
									"url": "https://example.com/webhooks/sajn",
									"replayOfId": null,
									"requestBody": {
										"id": "cm4k2x9p10014abcd1234efgh",
										"type": "document.fully_signed",
										"createdAt": "2026-09-29T07:41:00.000Z",
										"apiVersion": "2026-10",
										"workspaceId": "cm4k2x9p10001abcd1234efgh",
										"environment": "PRODUCTION",
										"actor": null,
										"data": {
											"object": {
												"id": "cm4k2x9p10003abcd1234efgh",
												"externalId": "HR-2026-0142",
												"expiresAt": "2026-10-28T22:00:00.000Z",
												"name": "Anställningsavtal – Kai Lindqvist",
												"status": "PENDING",
												"documentMeta": {
													"subject": "Ditt anställningsavtal från Exempelbolaget AB",
													"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
													"signingMode": "PARALLEL",
													"forceReadFullDocument": true,
													"showChatToSigners": false,
													"language": "sv",
													"value": null,
													"redirectUrl": null,
													"redirectEnabled": false,
													"internalRecipients": [
														"hr@example.com"
													],
													"signableAfterExpired": false,
													"sendPlainTextEmailOnly": null,
													"reminderIntervalDays": 3,
													"allowDelegation": false,
													"openVerification": null,
													"aiChatEnabled": null,
													"nationalIdDisplayMode": null,
													"sameDeviceSigning": false,
													"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
												},
												"createdAt": "2026-09-28T09:12:00.000Z",
												"updatedAt": "2026-09-29T07:41:00.000Z",
												"completedAt": null,
												"deletedAt": null,
												"templateId": "cm4k2x9p10008abcd1234efgh",
												"folderId": "cm4k2x9p10011abcd1234efgh",
												"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
												"parties": [
													{
														"id": "cm4k2x9p10004abcd1234efgh",
														"documentId": "cm4k2x9p10003abcd1234efgh",
														"email": "kai@example.com",
														"name": "Kai Lindqvist",
														"phone": "+46701740605",
														"type": "INDIVIDUAL",
														"company": null,
														"externalId": "EMP-0142",
														"contactId": "cm4k2x9p10006abcd1234efgh",
														"nationalId": null,
														"country": "SE",
														"role": "SIGNER",
														"signingOrder": 1,
														"signedAt": "2026-09-29T07:41:00.000Z",
														"readStatus": "READ",
														"signingStatus": "SIGNED",
														"delivery": [
															"EMAIL"
														],
														"signatureMethod": "SE_BANKID",
														"signVerification": null,
														"openVerification": null,
														"sendStatus": "DELIVERED",
														"identityVerified": true,
														"identityMismatch": false,
														"createdAt": "2026-09-28T09:12:00.000Z"
													}
												],
												"tags": [],
												"customFields": [],
												"content": null,
												"productTables": [],
												"approvalRequestId": null,
												"bundleId": null
											}
										}
									},
									"attempts": [
										{
											"id": "cm4k2x9p10015abcd1234efgh",
											"attempt": 1,
											"status": "SUCCESS",
											"responseCode": 200,
											"durationMs": 1,
											"requestHeaders": {
												"startdatum": "Anställningsavtal – Kai Lindqvist"
											},
											"responseHeaders": {
												"startdatum": "Anställningsavtal – Kai Lindqvist"
											},
											"responseBody": null,
											"createdAt": "2026-09-28T09:12:00.000Z"
										}
									],
									"createdAt": "2026-09-28T09:12:00.000Z"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires webhooks:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"webhooks:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Webhook delivery not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "delivery"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"webhooks:write"
						]
					}
				]
			}
		},
		"/api/v1/documents/{id}/delegations": {
			"get": {
				"description": "Returns all delegation events on a document — when a signer hands off signing to someone else. Useful for compliance and audit integrations.",
				"summary": "List signer delegations for a document",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The document ID.",
						"example": "cm4k2x9p10003abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getDocumentDelegations",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The delegation ID."
													},
													"documentId": {
														"type": "string",
														"description": "The document ID."
													},
													"originalPartyId": {
														"type": "string",
														"description": "The ID of the party that delegated signing."
													},
													"delegatePartyId": {
														"description": "The ID of the party created for the delegate. Null until the delegate accepts.",
														"type": [
															"string",
															"null"
														]
													},
													"delegateName": {
														"type": "string",
														"description": "Name of the person the party delegated to."
													},
													"delegateEmail": {
														"description": "Email address of the delegate.",
														"type": [
															"string",
															"null"
														]
													},
													"delegatePhone": {
														"description": "Phone number of the delegate.",
														"type": [
															"string",
															"null"
														]
													},
													"reason": {
														"description": "Why the party delegated, as the party wrote it.",
														"type": [
															"string",
															"null"
														]
													},
													"status": {
														"type": "string",
														"enum": [
															"PENDING",
															"ACCEPTED",
															"DECLINED",
															"REVOKED",
															"COMPLETED",
															"EXPIRED"
														],
														"description": "Where the delegation stands."
													},
													"expiresAt": {
														"description": "When the delegate's invitation expires.",
														"type": "string",
														"format": "date-time"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the delegation was created."
													},
													"acceptedAt": {
														"description": "When the delegate accepted.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"declinedAt": {
														"description": "When the delegate declined.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"revokedAt": {
														"description": "When the delegation was revoked.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"completedAt": {
														"description": "When the delegate signed.",
														"type": [
															"string",
															"null"
														],
														"format": "date-time"
													},
													"originalParty": {
														"description": "The party that delegated signing.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "The party ID."
															},
															"name": {
																"type": "string"
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"email"
														],
														"additionalProperties": false
													},
													"delegateParty": {
														"description": "The party created for the delegate. Null until the delegate accepts.",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "The delegation ID."
															},
															"name": {
																"type": "string"
															},
															"email": {
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"name",
															"email"
														],
														"additionalProperties": false
													}
												},
												"required": [
													"id",
													"documentId",
													"originalPartyId",
													"delegatePartyId",
													"delegateName",
													"delegateEmail",
													"delegatePhone",
													"reason",
													"status",
													"expiresAt",
													"createdAt",
													"acceptedAt",
													"declinedAt",
													"revokedAt",
													"completedAt",
													"originalParty",
													"delegateParty"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"default": false,
											"description": "Always `false`: the list returns every item in one response.",
											"type": "boolean",
											"enum": [
												false
											]
										},
										"nextCursor": {
											"default": null,
											"description": "Always null: the list returns every item in one response.",
											"type": "null"
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10031abcd1234efgh",
											"documentId": "cm4k2x9p10003abcd1234efgh",
											"originalPartyId": "cm4k2x9p10004abcd1234efgh",
											"delegatePartyId": null,
											"delegateName": "Robin Ek",
											"delegateEmail": "robin@example.com",
											"delegatePhone": "+46701740606",
											"reason": "Jag är föräldraledig. Robin Ek signerar i mitt ställe.",
											"status": "PENDING",
											"expiresAt": "2026-10-28T22:00:00.000Z",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"acceptedAt": null,
											"declinedAt": null,
											"revokedAt": null,
											"completedAt": null,
											"originalParty": {
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com"
											},
											"delegateParty": null
										}
									],
									"hasMore": false,
									"nextCursor": null
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Delegation not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "delegation"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/blocks": {
			"get": {
				"description": "List reusable content blocks (library entries) visible to the authenticated user.\n\nBlocks come in their library order (`sortOrder`), then newest first. Filter by `visibility`, or omit it for every block you can see:\n- `PRIVATE`: your private blocks in this workspace\n- `WORKSPACE`: blocks shared at workspace level\n- `ORGANIZATION`: blocks shared at organization level\n- `SHARED`: blocks sajn curates for everyone",
				"summary": "List reusable content blocks",
				"parameters": [
					{
						"name": "limit",
						"in": "query",
						"description": "Maximum number of items to return, from 1 to 100. Default: 25.",
						"schema": {
							"default": 25,
							"type": "integer",
							"minimum": 1,
							"maximum": 100
						}
					},
					{
						"name": "cursor",
						"in": "query",
						"description": "The `nextCursor` from the previous response, to get the next page. Keep the other parameters unchanged.",
						"schema": {
							"type": "string",
							"minLength": 1,
							"maxLength": 2048
						}
					},
					{
						"name": "include",
						"in": "query",
						"description": "`total` adds the number of items that match the filters. Counting takes time, so ask for it only when you need it.",
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": [
									"total"
								]
							}
						}
					},
					{
						"name": "query",
						"in": "query",
						"description": "Free-text search across name, description, and field metadata",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "category",
						"in": "query",
						"description": "Returns only blocks in this category.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "language",
						"in": "query",
						"description": "Returns only blocks in this language, an ISO 639-1 code such as `sv`.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "visibility",
						"in": "query",
						"description": "Returns only blocks with this `visibility`. Omit for every block you can see.",
						"schema": {
							"type": "string",
							"enum": [
								"PRIVATE",
								"WORKSPACE",
								"ORGANIZATION",
								"SHARED"
							]
						}
					},
					{
						"name": "fieldType",
						"in": "query",
						"description": "Filter to blocks whose single field has this FieldType",
						"schema": {
							"type": "string",
							"enum": [
								"TEXT",
								"HTML",
								"FORM",
								"PDF",
								"PRODUCT_TABLE",
								"TABLE",
								"SPACER",
								"PAGE_BREAK",
								"DURATION"
							]
						}
					},
					{
						"name": "createdAfter",
						"in": "query",
						"description": "Only blocks created at or after this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "createdBefore",
						"in": "query",
						"description": "Only blocks created at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedAfter",
						"in": "query",
						"description": "Only blocks updated at or after this ISO 8601 date or date-time. Use it for incremental sync.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "updatedBefore",
						"in": "query",
						"description": "Only blocks updated at or before this ISO 8601 date or date-time.",
						"schema": {
							"type": "string"
						}
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getBlocks",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The block ID."
													},
													"name": {
														"type": "string"
													},
													"description": {
														"type": [
															"string",
															"null"
														]
													},
													"visibility": {
														"type": "string",
														"enum": [
															"PRIVATE",
															"WORKSPACE",
															"ORGANIZATION",
															"SHARED"
														],
														"description": "`PRIVATE` for your own blocks in this workspace, `WORKSPACE` for blocks shared in the workspace, `ORGANIZATION` for blocks shared across the organization, and `SHARED` for the blocks sajn curates for everyone."
													},
													"category": {
														"type": [
															"string",
															"null"
														]
													},
													"language": {
														"type": "string",
														"description": "The block's language, an ISO 639-1 code such as `sv`."
													},
													"isPublished": {
														"type": "boolean"
													},
													"sortOrder": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"workspaceId": {
														"type": [
															"string",
															"null"
														],
														"description": "The workspace ID."
													},
													"organizationId": {
														"type": [
															"string",
															"null"
														],
														"description": "The organization ID."
													},
													"createdBy": {
														"description": "A sajn user",
														"type": [
															"object",
															"null"
														],
														"properties": {
															"id": {
																"type": "string",
																"description": "User ID"
															},
															"email": {
																"type": "string"
															},
															"name": {
																"description": "Full name. Null when the user has no name.",
																"type": [
																	"string",
																	"null"
																]
															}
														},
														"required": [
															"id",
															"email",
															"name"
														],
														"additionalProperties": false
													},
													"createdAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the block was created."
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time",
														"description": "When the block was last updated."
													},
													"content": {
														"type": "array",
														"items": {
															"type": "object",
															"properties": {
																"id": {
																	"type": "string",
																	"description": "The block ID."
																},
																"type": {
																	"type": "string"
																},
																"position": {
																	"type": "integer",
																	"minimum": -9007199254740991,
																	"maximum": 9007199254740991
																},
																"fieldMeta": {
																	"type": "object",
																	"description": "Type-specific content, in the same shape as a document field's `fieldMeta`."
																}
															},
															"required": [
																"id",
																"type",
																"position",
																"fieldMeta"
															],
															"additionalProperties": false
														},
														"description": "The block's content blocks in position order"
													}
												},
												"required": [
													"id",
													"name",
													"description",
													"visibility",
													"category",
													"language",
													"isPublished",
													"sortOrder",
													"workspaceId",
													"organizationId",
													"createdBy",
													"createdAt",
													"updatedAt",
													"content"
												],
												"additionalProperties": false
											}
										},
										"hasMore": {
											"type": "boolean",
											"description": "True if more items follow this page."
										},
										"nextCursor": {
											"description": "Pass this as `cursor` to get the next page. Null on the last page.",
											"type": [
												"string",
												"null"
											]
										},
										"total": {
											"description": "The number of items that match the filters. Present only with `include=total`.",
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										}
									},
									"required": [
										"data",
										"hasMore",
										"nextCursor"
									],
									"additionalProperties": false
								},
								"example": {
									"data": [
										{
											"id": "cm4k2x9p10028abcd1234efgh",
											"name": "Sekretessklausul",
											"description": "Standardklausul om sekretess för anställda.",
											"visibility": "WORKSPACE",
											"category": "Avtal",
											"language": "sv",
											"isPublished": true,
											"sortOrder": 0,
											"workspaceId": "cm4k2x9p10001abcd1234efgh",
											"organizationId": "cm4k2x9p10000abcd1234efgh",
											"createdBy": {
												"id": "cm4k2x9p10002abcd1234efgh",
												"email": "alex@example.com",
												"name": "Alex Berg"
											},
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z",
											"content": [
												{
													"id": "cm4k2x9p10028abcd1234efgh",
													"type": "Sekretessklausul",
													"position": 0,
													"fieldMeta": {}
												}
											]
										}
									],
									"hasMore": false,
									"nextCursor": null,
									"total": 1
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "VALIDATION_FAILED",
									"message": "Unrecognized key: \"limit\"",
									"userMessage": "Förfrågan innehåller ogiltiga värden.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"issues": [
										{
											"path": "",
											"code": "UNRECOGNIZED_KEY",
											"message": "Unrecognized key: \"limit\""
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			}
		},
		"/api/v1/blocks/{id}": {
			"get": {
				"description": "Retrieve a single content block including its field metadata.",
				"summary": "Get a content block by ID",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The block ID.",
						"example": "cm4k2x9p10028abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					}
				],
				"operationId": "getBlock",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The block ID."
										},
										"name": {
											"type": "string"
										},
										"description": {
											"type": [
												"string",
												"null"
											]
										},
										"visibility": {
											"type": "string",
											"enum": [
												"PRIVATE",
												"WORKSPACE",
												"ORGANIZATION",
												"SHARED"
											],
											"description": "`PRIVATE` for your own blocks in this workspace, `WORKSPACE` for blocks shared in the workspace, `ORGANIZATION` for blocks shared across the organization, and `SHARED` for the blocks sajn curates for everyone."
										},
										"category": {
											"type": [
												"string",
												"null"
											]
										},
										"language": {
											"type": "string",
											"description": "The block's language, an ISO 639-1 code such as `sv`."
										},
										"isPublished": {
											"type": "boolean"
										},
										"sortOrder": {
											"type": "integer",
											"minimum": -9007199254740991,
											"maximum": 9007199254740991
										},
										"workspaceId": {
											"type": [
												"string",
												"null"
											],
											"description": "The workspace ID."
										},
										"organizationId": {
											"type": [
												"string",
												"null"
											],
											"description": "The organization ID."
										},
										"createdBy": {
											"description": "A sajn user",
											"type": [
												"object",
												"null"
											],
											"properties": {
												"id": {
													"type": "string",
													"description": "User ID"
												},
												"email": {
													"type": "string"
												},
												"name": {
													"description": "Full name. Null when the user has no name.",
													"type": [
														"string",
														"null"
													]
												}
											},
											"required": [
												"id",
												"email",
												"name"
											],
											"additionalProperties": false
										},
										"createdAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the block was created."
										},
										"updatedAt": {
											"type": "string",
											"format": "date-time",
											"description": "When the block was last updated."
										},
										"content": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": {
														"type": "string",
														"description": "The block ID."
													},
													"type": {
														"type": "string"
													},
													"position": {
														"type": "integer",
														"minimum": -9007199254740991,
														"maximum": 9007199254740991
													},
													"fieldMeta": {
														"type": "object",
														"description": "Type-specific content, in the same shape as a document field's `fieldMeta`."
													}
												},
												"required": [
													"id",
													"type",
													"position",
													"fieldMeta"
												],
												"additionalProperties": false
											},
											"description": "The block's content blocks in position order"
										}
									},
									"required": [
										"id",
										"name",
										"description",
										"visibility",
										"category",
										"language",
										"isPublished",
										"sortOrder",
										"workspaceId",
										"organizationId",
										"createdBy",
										"createdAt",
										"updatedAt",
										"content"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10028abcd1234efgh",
									"name": "Sekretessklausul",
									"description": "Standardklausul om sekretess för anställda.",
									"visibility": "WORKSPACE",
									"category": "Avtal",
									"language": "sv",
									"isPublished": true,
									"sortOrder": 0,
									"workspaceId": "cm4k2x9p10001abcd1234efgh",
									"organizationId": "cm4k2x9p10000abcd1234efgh",
									"createdBy": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg"
									},
									"createdAt": "2026-09-28T09:12:00.000Z",
									"updatedAt": "2026-09-28T09:15:00.000Z",
									"content": [
										{
											"id": "cm4k2x9p10028abcd1234efgh",
											"type": "Sekretessklausul",
											"position": 0,
											"fieldMeta": {}
										}
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:read",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:read"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "block"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`: the resource's current state doesn't allow the operation.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:read"
						]
					}
				]
			},
			"delete": {
				"description": "Delete a content block. PRIVATE blocks can only be deleted by their creator. WORKSPACE and ORGANIZATION blocks can be deleted by their creator or an organization administrator. sajn-curated globals cannot be deleted via the API.",
				"summary": "Delete a content block",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string"
						},
						"description": "The block ID.",
						"example": "cm4k2x9p10028abcd1234efgh"
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"2026-09",
								"2026-10"
							]
						},
						"description": "API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request."
					},
					{
						"name": "Sajn-Workspace",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"description": "ID of the workspace this request acts in, from `GET /api/v1/workspaces`. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns `403 WORKSPACE_ACCESS_DENIED`."
					},
					{
						"name": "Idempotency-Key",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string",
							"maxLength": 255
						},
						"description": "Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header `Idempotent-Replayed: true`); the same key with a different request returns 400."
					}
				],
				"operationId": "deleteBlock",
				"responses": {
					"200": {
						"description": "200",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": {
											"type": "string",
											"description": "The block ID."
										},
										"deleted": {
											"type": "boolean",
											"description": "Always `true`: the block is deleted.",
											"enum": [
												true
											]
										}
									},
									"required": [
										"id",
										"deleted"
									],
									"additionalProperties": false
								},
								"example": {
									"id": "cm4k2x9p10028abcd1234efgh",
									"deleted": true
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"400": {
						"description": "The request is invalid: `VALIDATION_FAILED`, `INVALID_JSON`, `INVALID_API_VERSION` or `API_VERSION_SUNSET`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_API_VERSION",
									"message": "Unknown API version \"2026-13\". Supported versions: 2026-09, 2026-10.",
									"userMessage": "API-versionen finns inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"401": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UNAUTHORIZED",
									"message": "Invalid API token",
									"userMessage": "Ogiltig API-nyckel",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"403": {
						"description": "`PERMISSION_DENIED`, `WORKSPACE_ACCESS_DENIED`, `ORGANIZATION_ACCESS_DENIED`, `INSUFFICIENT_SCOPE`, `PLAN_REQUIRED`, `ACCOUNT_INACTIVE`, `ACCOUNT_SETUP_REQUIRED` or `LIMIT_EXCEEDED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INSUFFICIENT_SCOPE",
									"message": "Insufficient OAuth scope: requires documents:write",
									"userMessage": "Applikationen saknar behörighet (scope) för denna åtgärd.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"requiredScopes": [
										"documents:write"
									],
									"grantedScopes": [
										"profile:read"
									]
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"404": {
						"description": "Error response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "NOT_FOUND",
									"message": "Block not found",
									"userMessage": "Resursen hittades inte.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2",
									"resource": "block"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"409": {
						"description": "`INVALID_STATE`, `ALREADY_EXISTS` or `IDEMPOTENCY_KEY_IN_USE`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INVALID_STATE",
									"message": "The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet.",
									"userMessage": "Åtgärden är inte möjlig i resursens nuvarande status.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"429": {
						"description": "`RATE_LIMITED`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "RATE_LIMITED",
									"message": "API rate limit exceeded",
									"userMessage": "För många förfrågningar. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							},
							"Retry-After": {
								"description": "Seconds to wait before you retry.",
								"schema": {
									"type": "integer"
								}
							},
							"Idempotent-Replayed": {
								"description": "`true` when the response is a stored response replayed for a repeated `Idempotency-Key`.",
								"schema": {
									"type": "string"
								}
							}
						}
					},
					"500": {
						"description": "`INTERNAL_ERROR`.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "INTERNAL_ERROR",
									"message": "Internal server error",
									"userMessage": "Något gick fel.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					},
					"503": {
						"description": "`UPSTREAM_UNAVAILABLE`: a service the operation depends on failed. Retry with exponential backoff.",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"code": {
											"type": "string",
											"enum": [
												"VALIDATION_FAILED",
												"INVALID_JSON",
												"EXPIRED",
												"IDEMPOTENCY_KEY_REUSED",
												"WORKSPACE_REQUIRED",
												"ORGANIZATION_REQUIRED",
												"INVALID_API_VERSION",
												"API_VERSION_SUNSET",
												"UNAUTHORIZED",
												"API_KEY_EXPIRED",
												"PERMISSION_DENIED",
												"WORKSPACE_ACCESS_DENIED",
												"ORGANIZATION_ACCESS_DENIED",
												"INSUFFICIENT_SCOPE",
												"PLAN_REQUIRED",
												"ACCOUNT_INACTIVE",
												"ACCOUNT_SETUP_REQUIRED",
												"LIMIT_EXCEEDED",
												"DOCUMENT_NOT_READY",
												"APPROVAL_REQUIRED",
												"NOT_FOUND",
												"ROUTE_NOT_FOUND",
												"INVALID_STATE",
												"BUNDLE_OWNS_SETTING",
												"ALREADY_EXISTS",
												"IDEMPOTENCY_KEY_IN_USE",
												"RATE_LIMITED",
												"INTERNAL_ERROR",
												"UPSTREAM_UNAVAILABLE"
											],
											"description": "Machine-readable error code from a closed list. Branch on it, never on `message`."
										},
										"message": {
											"type": "string",
											"description": "What went wrong, in English, for developers. Its wording can change; don't parse it."
										},
										"userMessage": {
											"type": "string",
											"description": "Text that is safe to show to an end user, usually in Swedish"
										},
										"requestId": {
											"type": "string",
											"description": "Identifier of the request, the same value as the `Sajn-Request-Id` header. Quote it when you contact support."
										},
										"resource": {
											"description": "On a 404 `NOT_FOUND`, the type of the missing resource, such as `document` or `party`; `null` when the API can't tell",
											"type": [
												"string",
												"null"
											]
										},
										"issues": {
											"description": "Every validation issue, on a 400 `VALIDATION_FAILED`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"path": {
														"type": "string",
														"description": "Dotted path to the invalid value, such as `parties.0.email`; empty when no single input caused the issue"
													},
													"code": {
														"type": "string",
														"enum": [
															"INVALID_TYPE",
															"INVALID_FORMAT",
															"INVALID_VALUE",
															"TOO_SMALL",
															"TOO_BIG",
															"UNRECOGNIZED_KEY"
														]
													},
													"message": {
														"type": "string",
														"description": "What is wrong with the value, in English"
													}
												},
												"required": [
													"path",
													"code",
													"message"
												],
												"additionalProperties": false
											}
										},
										"requiredScopes": {
											"description": "OAuth scopes the endpoint requires, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"grantedScopes": {
											"description": "OAuth scopes the token was granted, on a 403 `INSUFFICIENT_SCOPE`",
											"type": "array",
											"items": {
												"type": "string"
											}
										},
										"readiness": {
											"description": "What blocks sending the document, on a 409 `DOCUMENT_NOT_READY`",
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"code": {
														"type": "string",
														"description": "What is wrong, such as `MISSING_EMAIL` or `NO_EXPIRATION`. New codes can be added."
													},
													"severity": {
														"type": "string",
														"enum": [
															"BLOCKER",
															"WARNING"
														],
														"description": "`BLOCKER` stops the send; `WARNING` doesn't."
													},
													"message": {
														"type": "string",
														"description": "What is wrong, in English"
													},
													"userMessage": {
														"type": "string",
														"description": "The same, naming the party or field, in Swedish, for showing to a user"
													}
												},
												"required": [
													"code",
													"severity",
													"message",
													"userMessage"
												],
												"additionalProperties": false
											}
										}
									},
									"required": [
										"code",
										"message",
										"userMessage",
										"requestId"
									],
									"additionalProperties": {},
									"description": "Error response"
								},
								"example": {
									"code": "UPSTREAM_UNAVAILABLE",
									"message": "A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff.",
									"userMessage": "En extern tjänst svarar inte just nu. Försök igen om en stund.",
									"requestId": "req_V1StGXR8Z5jdHi6BmyT2"
								}
							}
						},
						"headers": {
							"Sajn-Version": {
								"description": "API version that served the request.",
								"schema": {
									"type": "string"
								}
							},
							"Deprecation": {
								"description": "Present only when the version is deprecated: when it was deprecated, as `@<unix seconds>`.",
								"schema": {
									"type": "string"
								}
							},
							"Sunset": {
								"description": "Present only when the version is deprecated: the HTTP date from which requests on this version return 400 `API_VERSION_SUNSET`.",
								"schema": {
									"type": "string"
								}
							},
							"Sajn-Request-Id": {
								"description": "Identifier of the request. Error bodies repeat it as `requestId`; quote it when you contact support.",
								"schema": {
									"type": "string"
								}
							},
							"X-RateLimit-Limit": {
								"description": "Requests allowed per minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Remaining": {
								"description": "Requests left in the current minute.",
								"schema": {
									"type": "integer"
								}
							},
							"X-RateLimit-Reset": {
								"description": "When the minute window resets, in Unix seconds.",
								"schema": {
									"type": "integer"
								}
							}
						}
					}
				},
				"security": [
					{
						"bearerAuth": []
					},
					{
						"oauth2": [
							"documents:write"
						]
					}
				]
			}
		}
	},
	"info": {
		"title": "sajn API",
		"version": "2026-10",
		"description": "# sajn - API v1\n\nWith the sajn REST API, you can add digital document signing to your own applications.\n\n## Overview\n\nsajn is a Swedish digital document signing platform. With the API, you can:\n- Create and manage documents and templates\n- Add the parties who sign, review, or organize a document\n- Send documents for signing by email or SMS\n- Track document status and signatures\n- Manage contacts and companies\n- Organize documents with tags and custom fields\n- Verify identities with sajn ID, through BankID and other eIDs\n\n## Authentication\n\nEvery endpoint (except the health check) requires a bearer token in the Authorization header:\n\n```\nAuthorization: Bearer YOUR_TOKEN\n```\n\nTwo kinds of token are accepted:\n\n- **API key** — generated in the developer settings. A key belongs to a service account (`sajn_svc_...`), a non-human account the organization owns, or to the person who created it (`sajn_usr_...`). It can reach any endpoint its owner's workspace role permits, and holds no organization permissions. Service-account keys keep working when the person who created them leaves. Older keys start with `sajn_sk_` and keep working.\n- **OAuth 2.0 access token** — issued via the authorization-code flow (PKCE for public clients) to a connected application. Bound to one workspace and limited to the **scopes** the user granted at consent — effective access is *workspace role ∩ granted scopes*.\n\nAn API key acts in its default workspace. To act in another workspace the key's account is a member of, send its ID in the `Sajn-Workspace` header:\n\n```\nSajn-Workspace: WORKSPACE_ID\n```\n\n`GET /api/v1/workspaces` lists the workspaces the token can reach. A workspace that doesn't exist and one the key can't reach both return `403 WORKSPACE_ACCESS_DENIED`, and a header that isn't a single workspace ID returns `400 VALIDATION_FAILED`; the key's default workspace is never used instead.\n\nEach operation lists the OAuth scopes it requires in its security section. The scopes are coarse and resource-oriented (e.g. `documents:read`, `documents:write`, `documents:delete`, `contacts:read`). Personal API keys are not scope-limited; OAuth tokens are.\n\n## Rate Limiting\n\nLimits apply per organization and scale with the plan:\n\n| Plan | Per minute |\n|---|---|\n| Basic | 60 |\n| Solo | 120 |\n| Team | 600 |\n| Enterprise | 2 000 |\n| Sandbox | 60 |\n\nEvery response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` for the minute window. A `429` response includes `Retry-After` in seconds.\n\n## Query parameters\n\nQuery parameters are plain strings, such as `?externalId=12345&archived=false`:\n- Booleans are `true` or `false`.\n- Dates are ISO 8601 dates (`2026-10-01`) or date-times (`2026-10-01T08:00:00Z`). A date-time without an offset is UTC.\n- Filters that take several values accept a comma-separated list (`status=PENDING,COMPLETED`) or a repeated parameter (`status=PENDING&status=COMPLETED`).\n\nAn unknown query parameter returns `400`, so a misspelled filter never silently returns everything.\n\n## Pagination\n\nEvery list returns `{ data, hasMore, nextCursor }`. To walk a list, pass `nextCursor` as `cursor` on the next request, keep the other parameters unchanged, and stop when `hasMore` is `false`. `limit` sets the page size, from 1 to 100, with a default of 25. To get the number of items that match the filters, pass `include=total`, and the response adds `total`.\n\nLists sort newest first. To sort another way, pass `orderBy` and `orderDirection` where the list takes them. A list bounded by its parent, such as a document's parties, returns every item in one response, with `hasMore` set to `false` and `nextCursor` set to `null`.\n\nOn the documents list, the cursor is keyset-based: it stays correct while documents are created and updated between requests. To mirror documents into your own system, sort by `updatedAt` and use the `updatedAfter` filter.\n\n## Idempotent requests\n\nSend an `Idempotency-Key` header (any unique string up to 255 characters, for example a UUID) on `POST`, `PATCH` or `DELETE` requests to make retries safe. The first request runs normally and its response is stored for 24 hours, errors included. A retry with the same key and the same method, path and body returns the stored response with the header `Idempotent-Replayed: true`. Reusing a key with a different request returns `400 IDEMPOTENCY_KEY_REUSED`; retrying while the first request is still running returns `409 IDEMPOTENCY_KEY_IN_USE` with `Retry-After`. Responses with a `429` or `5xx` status aren't stored, so the retry runs again. Keys are scoped to the workspace.\n\n## Versioning\n\nThe API is versioned by date (`YYYY-MM`), and this reference documents version `2026-10`. To choose the version for a request, send the `Sajn-Version` header:\n\n```\nSajn-Version: 2026-10\n```\n\nWithout the header, a request uses your organization's default version. An organization without a default is pinned to the latest version by its first request. Every response returns the version that served it in `Sajn-Version`. On a deprecated version, responses also carry `Deprecation` and `Sunset` headers, and from the sunset date its requests return `400`. For details, see https://docs.sajn.se/api-reference/versioning.\n\n## Webhooks\n\nEach webhook endpoint has its own API version, set when you create it, that decides the payload shape. Deliveries carry it in the `Sajn-Version` header.\n\nThe delivery body is the event, `{ id, type, createdAt, apiVersion, workspaceId, organizationId, environment, actor, data }`, signed according to [Standard Webhooks](https://www.standardwebhooks.com) in the `webhook-id`, `webhook-timestamp` and `webhook-signature` headers. Common document events:\n- `document.created` - A document is created.\n- `document.sent` - A document is sent for signing.\n- `document.party.opened` - A party opens the document.\n- `document.party.signed` - A party signs the document.\n- `document.fully_signed` - Every signer has signed, before the document is sealed.\n- `document.completed` - The document is sealed and complete.\n- `document.rejected` - A party rejects the document.\n\nFor every event type, see `POST /api/v1/webhooks`.\n\n## Error Handling\n\nEvery error response has the same JSON shape:\n\n```json\n{\n  \"code\": \"NOT_FOUND\",\n  \"message\": \"Document not found\",\n  \"userMessage\": \"Dokumentet hittades inte.\",\n  \"requestId\": \"req_V1StGXR8Z5jdHi6BmyT2\",\n  \"resource\": \"document\"\n}\n```\n\n- `code` is always present and comes from the closed list in the following table. Branch on it, not on the status or the message.\n- `message` is English text for developers. When the operation has no more specific text, it's the meaning of `code` from the following table. Its wording can change, so don't parse it.\n- `userMessage` is always present. It's text that is safe to show your users, usually in Swedish.\n- `requestId` identifies the request and matches the `Sajn-Request-Id` header, which every response carries. Quote it when you contact support. On a replayed idempotent response, it identifies the original request.\n\nA `400 VALIDATION_FAILED` lists every problem in `issues`: `[{ \"path\": \"parties.0.email\", \"code\": \"INVALID_FORMAT\", \"message\": \"Invalid email address\" }]`. An issue `code` is one of `INVALID_TYPE`, `INVALID_FORMAT`, `INVALID_VALUE`, `TOO_SMALL`, `TOO_BIG` or `UNRECOGNIZED_KEY`, and an issue that no single input caused has an empty `path`. A `404 NOT_FOUND` names the type of the missing resource in `resource`, such as `document` or `party`, or `null` when the API can't tell. A `403 INSUFFICIENT_SCOPE` includes `requiredScopes` and `grantedScopes`.\n\nA `401` always means the credential itself is the problem: `UNAUTHORIZED` when it's missing, invalid or revoked, `API_KEY_EXPIRED` when the key has expired. A valid token that isn't allowed to do something gets a `403`. A `409 INVALID_STATE` means the resource's state doesn't allow the operation; change the state first, then retry. A `503 UPSTREAM_UNAVAILABLE` is safe to retry with exponential backoff, and so is a `429` after `Retry-After` seconds.\n\nThe API returns the following codes:\n\n| Code | Status | Meaning |\n|---|---|---|\n| `VALIDATION_FAILED` | 400 | The request failed validation. `issues` lists every problem. |\n| `INVALID_JSON` | 400 | The request body isn't valid JSON. |\n| `EXPIRED` | 400 | The link, code or resource has expired. |\n| `IDEMPOTENCY_KEY_REUSED` | 400 | The `Idempotency-Key` was already used with a different request. |\n| `WORKSPACE_REQUIRED` | 400 | The API key has no default workspace. Name one with the `Sajn-Workspace` header. |\n| `INVALID_API_VERSION` | 400 | The `Sajn-Version` header names a version that doesn't exist. |\n| `API_VERSION_SUNSET` | 400 | The requested version, or your organization's default, is past its sunset date. |\n| `UNAUTHORIZED` | 401 | The API token is missing, invalid or revoked. |\n| `API_KEY_EXPIRED` | 401 | The API key has passed its expiry date. Create a new key. |\n| `PERMISSION_DENIED` | 403 | The token's user isn't allowed to perform the operation, for example because their workspace role lacks a permission. |\n| `WORKSPACE_ACCESS_DENIED` | 403 | The workspace named by the `Sajn-Workspace` header doesn't exist, or the token can't act in it. |\n| `INSUFFICIENT_SCOPE` | 403 | The OAuth token wasn't granted a scope the operation requires. See `requiredScopes` and `grantedScopes`. |\n| `PLAN_REQUIRED` | 403 | The organization's plan doesn't include API access or the feature. |\n| `ACCOUNT_INACTIVE` | 403 | The organization, user or membership behind the token is deactivated or suspended. |\n| `ACCOUNT_SETUP_REQUIRED` | 403 | The organization must finish its setup, such as verifying an accountable person, first. |\n| `LIMIT_EXCEEDED` | 403 | A plan limit was reached, such as the monthly number of sent documents. |\n| `DOCUMENT_NOT_READY` | 409 | The document can't be sent yet. `readiness` lists what blocks it, the same list `GET /api/v1/documents/:id/readiness` returns. |\n| `APPROVAL_REQUIRED` | 409 | The operation needs an approval first, such as sending a document that the workspace requires an approval for. Request one with `POST /api/v1/approval-requests`. |\n| `NOT_FOUND` | 404 | The resource doesn't exist, or the token can't access it. `resource` names its type, such as `document`, or is `null` when the API can't tell. |\n| `ROUTE_NOT_FOUND` | 404 | No endpoint matches the method and path in the requested API version. |\n| `INVALID_STATE` | 409 | The resource's current state doesn't allow the operation, such as editing a document that was already sent or downloading a file that isn't produced yet. |\n| `BUNDLE_OWNS_SETTING` | 409 | The document is in a bundle, and the bundle owns what the operation changes: the parties, the send settings, sending, and withdrawing. Make the change on the bundle, through `/api/v1/bundles/{id}`. The document's `bundleId` names it. |\n| `ALREADY_EXISTS` | 409 | A resource with the same unique value, such as `externalId`, already exists. |\n| `IDEMPOTENCY_KEY_IN_USE` | 409 | A request with the same `Idempotency-Key` is still running. Retry after `Retry-After` seconds. |\n| `RATE_LIMITED` | 429 | The per-minute rate limit was reached. Retry after `Retry-After` seconds. |\n| `INTERNAL_ERROR` | 500 | Something went wrong on sajn's side. Quote `requestId` when you contact support. |\n| `UPSTREAM_UNAVAILABLE` | 503 | A service the operation depends on, such as an eID provider or a connected integration, failed or is unavailable. Retry with exponential backoff. |\n\n## Support\n\nFor API support, documentation, or questions:\n- Email: dev@sajn.se\n- Documentation: https://docs.sajn.se\n- Status: https://status.sajn.se",
		"contact": {
			"name": "sajn Support",
			"email": "dev@sajn.se",
			"url": "https://www.sajn.se/support"
		},
		"license": {
			"name": "Policy",
			"url": "https://www.sajn.se/allmanna-villkor"
		}
	},
	"servers": [
		{
			"url": "https://app.sajn.se",
			"description": "Production server"
		}
	],
	"components": {
		"securitySchemes": {
			"bearerAuth": {
				"type": "http",
				"scheme": "bearer",
				"description": "API key, e.g. `Authorization: Bearer sajn_svc_...`. Not scope-limited: acts with its owner's workspace role."
			},
			"oauth2": {
				"type": "oauth2",
				"description": "OAuth 2.0 access token for a connected application. Limited to the scopes granted at consent.",
				"flows": {
					"authorizationCode": {
						"authorizationUrl": "https://app.sajn.se/oauth/authorize",
						"tokenUrl": "https://app.sajn.se/api/oauth/token",
						"refreshUrl": "https://app.sajn.se/api/oauth/token",
						"scopes": {
							"profile:read": "Read the user's profile, including name, phone number and email address.",
							"documents:read": "Read documents.",
							"documents:write": "Create documents and edit the documents the user created.",
							"documents:delete": "Delete documents, files, folders, custom fields and comment threads.",
							"forms:read": "Read forms and their settings.",
							"forms:write": "Create, edit and publish forms.",
							"forms:delete": "Permanently delete forms and their submissions.",
							"forms:submissions:read": "Read form submissions and the respondents' contact details.",
							"templates:read": "Read templates.",
							"templates:write": "Create and edit templates.",
							"contacts:read": "Read contacts.",
							"contacts:write": "Create and edit contacts.",
							"contacts:delete": "Delete contacts.",
							"organization:read": "Read information about the organization.",
							"audit:read": "Read document activity and event logs.",
							"signatures:read": "Read the identity the eID verified at signing, including the national identity number.",
							"sajnid:read": "Read sajn ID verifications.",
							"sajnid:write": "Create sajn ID verifications.",
							"login:read": "Read the result of sajn Login sessions.",
							"login:write": "Start sajn Login sessions.",
							"webhooks:read": "Read webhooks and their deliveries.",
							"webhooks:write": "Create, edit and delete webhooks.",
							"actions:read": "Read suggested actions and what each one does.",
							"actions:write": "Approve, dismiss and snooze suggested actions. An approval can send reminders to counterparties, terminate agreements and create follow-ups.",
							"members:read": "Read the workspace's members.",
							"members:write": "Invite and manage workspace members.",
							"roles:read": "Read the workspace's roles and permissions.",
							"roles:write": "Create, edit and delete workspace roles.",
							"sajn:read": "MCP only. Read everything the user's role can read in the workspace.",
							"sajn:write": "MCP only. Includes sajn:read, and create, change and send within the user's role.",
							"sajn:admin": "MCP only. Includes sajn:write, and manage members, roles and settings within the user's role."
						}
					}
				}
			}
		},
		"schemas": {
			"WebhookActor": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"enum": [
							"USER",
							"API_KEY",
							"OAUTH_APP",
							"SYSTEM"
						],
						"description": "`USER` for a member, `API_KEY` for an API key, `OAUTH_APP` for an OAuth application, and `SYSTEM` for sajn itself, such as a scheduled reminder."
					},
					"id": {
						"description": "ID of the user, API key or OAuth application. Null for `SYSTEM`.",
						"type": [
							"string",
							"null"
						]
					}
				},
				"required": [
					"type",
					"id"
				],
				"description": "Who caused the event. Null when sajn can't attribute it: a party's action, such as signing, and most changes made in the sajn app."
			},
			"WebhookDocument": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Unique document identifier"
					},
					"externalId": {
						"description": "Your external reference ID for this document",
						"type": [
							"string",
							"null"
						]
					},
					"expiresAt": {
						"description": "Date and time when the document expires",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"name": {
						"type": "string",
						"description": "Document name/title"
					},
					"status": {
						"type": "string",
						"enum": [
							"DRAFT",
							"PENDING_APPROVAL",
							"PENDING",
							"COMPLETED",
							"EXPIRED",
							"CANCELLED",
							"REJECTED",
							"IMPORTED"
						],
						"description": "Document status"
					},
					"documentMeta": {
						"description": "Document metadata including subject, message, signing order, etc.",
						"type": [
							"object",
							"null"
						],
						"properties": {
							"subject": {
								"description": "Email subject line when sending document",
								"type": [
									"string",
									"null"
								]
							},
							"message": {
								"description": "Custom message included in signing invitation",
								"type": [
									"string",
									"null"
								]
							},
							"signingMode": {
								"description": "How the parties sign: PARALLEL, all at once, or SEQUENTIAL, one at a time in the order of each party's `signingOrder`",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"PARALLEL",
									"SEQUENTIAL",
									null
								]
							},
							"forceReadFullDocument": {
								"description": "Whether signers must read the entire document before signing",
								"type": [
									"boolean",
									"null"
								]
							},
							"showChatToSigners": {
								"description": "Whether to show document chat to signers",
								"type": [
									"boolean",
									"null"
								]
							},
							"language": {
								"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"sv",
									"en",
									"no",
									"da",
									"fi",
									"de",
									"is",
									"es",
									"fr",
									"it",
									null
								]
							},
							"value": {
								"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
								"type": [
									"string",
									"null"
								]
							},
							"redirectUrl": {
								"description": "URL to redirect signers to after signing is complete. New values must be http(s); legacy values are returned as stored.",
								"type": [
									"string",
									"null"
								]
							},
							"redirectEnabled": {
								"description": "Whether redirect after signing is enabled",
								"type": [
									"boolean",
									"null"
								]
							},
							"internalRecipients": {
								"description": "Email addresses that receive a copy of the sealed PDF once the document is completed",
								"type": [
									"array",
									"null"
								],
								"items": {
									"type": "string"
								}
							},
							"signableAfterExpired": {
								"description": "Whether the document remains signable after its expiration date",
								"type": [
									"boolean",
									"null"
								]
							},
							"sendPlainTextEmailOnly": {
								"description": "Send plain text email invitations only (no HTML). null inherits the workspace default.",
								"type": [
									"boolean",
									"null"
								]
							},
							"reminderIntervalDays": {
								"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
								"type": [
									"integer",
									"null"
								],
								"minimum": -9007199254740991,
								"maximum": 9007199254740991
							},
							"allowDelegation": {
								"description": "Whether signers may delegate signing to another person",
								"type": [
									"boolean",
									"null"
								]
							},
							"openVerification": {
								"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"PIN",
									"SMS",
									"EMAIL",
									"SE_BANKID",
									"NO_BANKID_BIOMETRIC",
									"NO_BANKID_HIGH",
									"DK_MITID",
									"DK_MITID_ERHVERV",
									"FI_FTN",
									"NL_IDIN",
									null
								]
							},
							"aiChatEnabled": {
								"description": "Whether the signer-facing AI chat is enabled. null inherits the workspace default.",
								"type": [
									"boolean",
									"null"
								]
							},
							"nationalIdDisplayMode": {
								"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"FULL",
									"PARTIAL",
									"NONE",
									null
								]
							},
							"sameDeviceSigning": {
								"description": "Whether all parties sign in sequence on one device",
								"type": [
									"boolean",
									"null"
								]
							},
							"documentCategoryId": {
								"description": "Document category (Dokumenttyp) scoping which custom fields apply. See GET /api/v1/document-categories.",
								"type": [
									"string",
									"null"
								]
							}
						},
						"required": [
							"subject",
							"message",
							"signingMode",
							"forceReadFullDocument",
							"showChatToSigners",
							"language",
							"value",
							"redirectUrl",
							"redirectEnabled",
							"internalRecipients",
							"signableAfterExpired",
							"sendPlainTextEmailOnly",
							"reminderIntervalDays",
							"allowDelegation",
							"openVerification",
							"aiChatEnabled",
							"nationalIdDisplayMode",
							"sameDeviceSigning",
							"documentCategoryId"
						]
					},
					"createdAt": {
						"description": "Date and time when the document was created",
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"description": "Date and time when the document was last updated",
						"type": "string",
						"format": "date-time"
					},
					"completedAt": {
						"description": "Date and time when all signers completed signing",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"deletedAt": {
						"description": "Date and time when the document moved to the trash, or null when it isn't in the trash",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"templateId": {
						"description": "ID of the template the document was created from, or null",
						"type": [
							"string",
							"null"
						]
					},
					"folderId": {
						"description": "ID of the folder that holds the document, or null at the top level",
						"type": [
							"string",
							"null"
						]
					},
					"responsibleUserId": {
						"description": "ID of the workspace member responsible for the document",
						"type": [
							"string",
							"null"
						]
					},
					"parties": {
						"description": "Array of document parties (signers and other participants).",
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/WebhookParty"
						}
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"color": {
									"type": "string"
								}
							},
							"required": [
								"id",
								"name",
								"color"
							]
						}
					},
					"customFields": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"type": {
									"type": "string",
									"enum": [
										"TEXT",
										"NUMBER",
										"DATE",
										"EMAIL",
										"PHONE",
										"URL",
										"BOOLEAN",
										"SELECT",
										"JSON",
										"TEXTAREA"
									]
								},
								"value": {
									"type": [
										"string",
										"null"
									]
								}
							},
							"required": [
								"id",
								"name",
								"type",
								"value"
							]
						}
					},
					"content": {
						"description": "Content blocks in position order when you pass `expand=content`, and null otherwise. See the content endpoints for the per-type shapes.",
						"type": [
							"array",
							"null"
						],
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string",
									"description": "Unique field identifier"
								},
								"documentId": {
									"description": "Document this field belongs to",
									"type": [
										"string",
										"null"
									]
								},
								"templateId": {
									"description": "Template this field belongs to",
									"type": [
										"string",
										"null"
									]
								},
								"type": {
									"type": "string",
									"enum": [
										"TEXT",
										"HTML",
										"FORM",
										"PDF",
										"PRODUCT_TABLE",
										"TABLE",
										"SPACER",
										"PAGE_BREAK",
										"DURATION"
									],
									"description": "Field type"
								},
								"position": {
									"type": "number",
									"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
								},
								"fieldMeta": {
									"anyOf": [
										{
											"oneOf": [
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"TEXT"
															]
														},
														"content": {
															"type": "string"
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"HTML"
															]
														},
														"content": {
															"type": "string"
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"PDF"
															]
														},
														"value": {
															"type": "string"
														},
														"numPages": {
															"type": "number"
														},
														"pageIndex": {
															"type": "integer",
															"minimum": 0,
															"maximum": 9007199254740991
														},
														"instruction": {
															"type": "string"
														},
														"formFields": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"name": {
																		"type": "string"
																	},
																	"type": {
																		"type": "string",
																		"enum": [
																			"TEXT",
																			"CHECKBOX",
																			"DROPDOWN",
																			"RADIO"
																		]
																	},
																	"page": {
																		"type": "integer",
																		"minimum": 1,
																		"maximum": 9007199254740991,
																		"description": "The page the box is on, counted from 1."
																	},
																	"rect": {
																		"type": "object",
																		"properties": {
																			"x": {
																				"type": "number"
																			},
																			"y": {
																				"type": "number"
																			},
																			"width": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"height": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			}
																		},
																		"required": [
																			"x",
																			"y",
																			"width",
																			"height"
																		],
																		"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																	},
																	"pageWidth": {
																		"type": "number",
																		"exclusiveMinimum": 0
																	},
																	"pageHeight": {
																		"type": "number",
																		"exclusiveMinimum": 0
																	},
																	"pageRotation": {
																		"anyOf": [
																			{
																				"type": "number",
																				"enum": [
																					0
																				]
																			},
																			{
																				"type": "number",
																				"enum": [
																					90
																				]
																			},
																			{
																				"type": "number",
																				"enum": [
																					180
																				]
																			},
																			{
																				"type": "number",
																				"enum": [
																					270
																				]
																			}
																		]
																	},
																	"options": {
																		"type": "array",
																		"items": {
																			"type": "string"
																		}
																	},
																	"required": {
																		"type": "boolean"
																	},
																	"readOnly": {
																		"type": "boolean"
																	},
																	"multiline": {
																		"type": "boolean"
																	},
																	"exportValue": {
																		"type": "string"
																	}
																},
																"required": [
																	"name",
																	"type",
																	"page",
																	"rect",
																	"pageWidth",
																	"pageHeight"
																],
																"additionalProperties": {}
															}
														},
														"formValues": {
															"type": "object",
															"additionalProperties": {
																"type": [
																	"string",
																	"boolean"
																]
															}
														},
														"placedFields": {
															"type": "array",
															"items": {
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"fontSize": {
																						"type": "number",
																						"minimum": 6,
																						"maximum": 72
																					},
																					"color": {
																						"type": "string",
																						"pattern": "^#[0-9a-fA-F]{6}$"
																					},
																					"bold": {
																						"type": "boolean"
																					},
																					"italic": {
																						"type": "boolean"
																					},
																					"align": {
																						"type": "string",
																						"enum": [
																							"LEFT",
																							"CENTER",
																							"RIGHT"
																						]
																					}
																				}
																			},
																			"kind": {
																				"type": "string",
																				"enum": [
																					"INPUT"
																				]
																			},
																			"inputType": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"DATE",
																					"CHECKBOX",
																					"SELECT",
																					"DRAW",
																					"SIGNATURE",
																					"INITIALS"
																				]
																			},
																			"label": {
																				"type": "string"
																			},
																			"fillSource": {
																				"type": "string",
																				"enum": [
																					"SIGNER",
																					"FIXED",
																					"NONE",
																					"VARIABLE"
																				]
																			},
																			"partyId": {
																				"type": "string"
																			},
																			"variableId": {
																				"type": "string"
																			},
																			"identity": {
																				"type": "string",
																				"enum": [
																					"name",
																					"ssn"
																				]
																			},
																			"drawn": {
																				"type": "boolean"
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"format": {
																				"type": "string",
																				"enum": [
																					"email",
																					"phone",
																					"personnummer",
																					"orgnr",
																					"number"
																				]
																			},
																			"min": {
																				"type": "number"
																			},
																			"max": {
																				"type": "number"
																			},
																			"decimals": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 6
																			},
																			"step": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			}
																		},
																		"required": [
																			"id",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight",
																			"kind",
																			"inputType"
																		],
																		"additionalProperties": {}
																	},
																	{
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"fontSize": {
																						"type": "number",
																						"minimum": 6,
																						"maximum": 72
																					},
																					"color": {
																						"type": "string",
																						"pattern": "^#[0-9a-fA-F]{6}$"
																					},
																					"bold": {
																						"type": "boolean"
																					},
																					"italic": {
																						"type": "boolean"
																					},
																					"align": {
																						"type": "string",
																						"enum": [
																							"LEFT",
																							"CENTER",
																							"RIGHT"
																						]
																					}
																				}
																			},
																			"kind": {
																				"type": "string",
																				"enum": [
																					"STATIC"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"text": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"id",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight",
																			"kind"
																		],
																		"additionalProperties": {}
																	}
																]
															}
														},
														"locked": {
															"type": "boolean"
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"FORM"
															]
														},
														"columns": {
															"type": "number",
															"minimum": 1
														},
														"fields": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string",
																		"minLength": 1
																	},
																	"key": {
																		"type": "string",
																		"pattern": "^[a-z0-9_-]*$"
																	},
																	"type": {
																		"type": "string",
																		"enum": [
																			"INPUT",
																			"TEXT",
																			"SELECT",
																			"DATEPICKER",
																			"RADIO",
																			"CHECKBOX",
																			"NUMBER",
																			"ATTACHMENT"
																		]
																	},
																	"row": {
																		"type": "number",
																		"minimum": 0
																	},
																	"column": {
																		"type": "number",
																		"minimum": 0
																	},
																	"colSpan": {
																		"type": "integer",
																		"exclusiveMinimum": 0,
																		"maximum": 9007199254740991
																	},
																	"fieldMeta": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"value": {
																						"type": "string"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr"
																						]
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"maxLength": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 10000
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"TEXT"
																						]
																					},
																					"value": {
																						"type": "string"
																					},
																					"rows": {
																						"type": "integer",
																						"minimum": 2,
																						"maximum": 20
																					},
																					"maxLength": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 10000
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"SELECT"
																						]
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"value"
																							]
																						}
																					},
																					"defaultValue": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"DATEPICKER"
																						]
																					},
																					"value": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"RADIO"
																						]
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"value"
																							]
																						}
																					},
																					"value": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"CHECKBOX"
																						]
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"value"
																							]
																						}
																					},
																					"values": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"NUMBER"
																						]
																					},
																					"value": {
																						"type": "string"
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"unit": {
																						"type": "string",
																						"maxLength": 12
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"ATTACHMENT"
																						]
																					},
																					"appendixLabel": {
																						"type": "string"
																					},
																					"allowedTypes": {
																						"type": "array",
																						"items": {
																							"type": "string",
																							"enum": [
																								"PDF",
																								"IMAGE"
																							]
																						}
																					},
																					"includeInDocument": {
																						"type": "boolean"
																					},
																					"value": {
																						"type": "object",
																						"properties": {
																							"filename": {
																								"type": "string"
																							},
																							"mimeType": {
																								"type": "string"
																							},
																							"size": {
																								"type": "number",
																								"description": "Size in bytes"
																							}
																						},
																						"required": [
																							"filename",
																							"mimeType",
																							"size"
																						],
																						"additionalProperties": {},
																						"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																					}
																				},
																				"required": [
																					"type"
																				]
																			}
																		]
																	}
																},
																"required": [
																	"id",
																	"row",
																	"column"
																]
															}
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type",
														"columns",
														"fields"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"PRODUCT_TABLE"
															]
														},
														"name": {
															"type": "string"
														},
														"enableName": {
															"type": "boolean"
														},
														"columns": {
															"type": "object",
															"additionalProperties": {
																"type": "object",
																"properties": {
																	"name": {
																		"type": "string"
																	},
																	"originalName": {
																		"type": "string"
																	},
																	"enabled": {
																		"type": "boolean"
																	},
																	"key": {},
																	"settings": {
																		"type": "object",
																		"properties": {
																			"decimalPlaces": {
																				"type": "number"
																			},
																			"oneTimePayment": {
																				"type": "boolean"
																			},
																			"pricePrefix": {
																				"type": "string"
																			},
																			"priceSuffix": {
																				"type": "string"
																			},
																			"pricesIncludeVat": {
																				"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																				"type": "boolean"
																			},
																			"defaultVatRate": {
																				"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																				"type": "number"
																			},
																			"showVatBreakdown": {
																				"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																				"type": "boolean"
																			}
																		}
																	}
																},
																"required": [
																	"name",
																	"originalName",
																	"enabled",
																	"key",
																	"settings"
																]
															}
														},
														"summaryLabels": {
															"type": "object",
															"properties": {
																"subtotal": {
																	"type": "string"
																},
																"vat": {
																	"type": "string"
																},
																"total": {
																	"type": "string"
																},
																"payable": {
																	"type": "string"
																}
															},
															"required": [
																"subtotal",
																"vat",
																"total"
															]
														},
														"allowSelection": {
															"type": "boolean"
														},
														"selectionPartyId": {
															"type": "string"
														},
														"selectionRequired": {
															"type": "boolean"
														},
														"selectedProductIds": {
															"type": "array",
															"items": {
																"type": "string"
															}
														},
														"recipientChoice": {
															"type": "object",
															"properties": {
																"selectedIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"quantities": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "number"
																	}
																}
															},
															"required": [
																"selectedIds",
																"quantities"
															]
														},
														"payment": {
															"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
															"type": "object",
															"properties": {
																"enabled": {
																	"type": "boolean"
																},
																"payerPartyId": {
																	"description": "The party who pays. Without it, `selectionPartyId` pays.",
																	"type": "string"
																},
																"basis": {
																	"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"FIRST_PERIOD"
																	]
																},
																"percent": {
																	"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																	"type": "integer",
																	"minimum": 1,
																	"maximum": 100
																}
															},
															"required": [
																"enabled"
															]
														},
														"sections": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"pickOne": {
																		"type": "boolean"
																	},
																	"showSubtotal": {
																		"type": "boolean"
																	}
																},
																"required": [
																	"id",
																	"name"
																]
															}
														},
														"discount": {
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PERCENT",
																		"AMOUNT"
																	]
																},
																"value": {
																	"type": "number"
																},
																"label": {
																	"type": "string"
																}
															},
															"required": [
																"type",
																"value"
															]
														},
														"pricing": {
															"type": "object",
															"properties": {
																"pricesIncludeVat": {
																	"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																	"type": "boolean"
																},
																"defaultVatRate": {
																	"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																	"type": "number"
																},
																"showVatBreakdown": {
																	"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																	"type": "boolean"
																}
															}
														},
														"style": {
															"type": "object",
															"properties": {
																"border": {
																	"type": "boolean"
																},
																"rounded": {
																	"type": "boolean"
																}
															}
														},
														"currency": {
															"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
															"type": "string",
															"pattern": "^[A-Z]{3}$"
														},
														"language": {
															"type": "string",
															"enum": [
																"sv",
																"en",
																"no",
																"da",
																"fi",
																"de",
																"is",
																"es",
																"fr",
																"it"
															]
														},
														"products": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"description": {
																		"type": "string"
																	},
																	"price": {
																		"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																		"type": "number"
																	},
																	"unit": {
																		"type": "string"
																	},
																	"quantity": {
																		"type": "number"
																	},
																	"vat": {
																		"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																		"type": "number"
																	},
																	"optional": {
																		"type": "boolean"
																	},
																	"defaultSelected": {
																		"type": "boolean"
																	},
																	"quantityEditable": {
																		"type": "boolean"
																	},
																	"quantityMin": {
																		"type": "number"
																	},
																	"quantityMax": {
																		"type": "number"
																	},
																	"discount": {
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PERCENT",
																					"AMOUNT"
																				]
																			},
																			"value": {
																				"type": "number"
																			}
																		},
																		"required": [
																			"type",
																			"value"
																		]
																	},
																	"billing": {
																		"type": "string",
																		"enum": [
																			"ONE_TIME",
																			"MONTHLY",
																			"QUARTERLY",
																			"YEARLY"
																		]
																	},
																	"sectionId": {
																		"type": "string"
																	},
																	"sku": {
																		"type": "string"
																	},
																	"productId": {
																		"type": "string"
																	},
																	"productType": {
																		"type": "string",
																		"enum": [
																			"GOODS",
																			"SERVICE",
																			"ROT",
																			"RUT"
																		]
																	}
																},
																"required": [
																	"id",
																	"name"
																]
															}
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type",
														"name",
														"columns",
														"products"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"TABLE"
															]
														},
														"columns": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"type": {
																		"type": "string",
																		"enum": [
																			"TEXT",
																			"NUMBER"
																		]
																	}
																},
																"required": [
																	"id",
																	"name",
																	"type"
																]
															}
														},
														"rows": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"cells": {
																		"type": "array",
																		"items": {
																			"type": "object",
																			"properties": {
																				"columnId": {
																					"type": "string"
																				},
																				"value": {
																					"type": [
																						"string",
																						"number"
																					]
																				}
																			},
																			"required": [
																				"columnId",
																				"value"
																			]
																		}
																	}
																},
																"required": [
																	"id",
																	"cells"
																]
															}
														},
														"showHeaders": {
															"type": "boolean"
														},
														"style": {
															"type": "object",
															"properties": {
																"border": {
																	"type": "boolean"
																},
																"rounded": {
																	"type": "boolean"
																}
															}
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type",
														"columns",
														"rows"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"SPACER"
															]
														},
														"size": {
															"type": "string",
															"enum": [
																"S",
																"M",
																"L",
																"XL"
															]
														},
														"locked": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"PAGE_BREAK"
															]
														},
														"locked": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"DURATION"
															]
														},
														"durationType": {
															"type": "string",
															"enum": [
																"NONE",
																"SINGLE_PERIOD",
																"RECURRING",
																"RECURRING_WITH_INITIAL",
																"NOT_SET"
															]
														},
														"period": {
															"type": "object",
															"properties": {
																"value": {
																	"type": "integer",
																	"exclusiveMinimum": 0,
																	"maximum": 9007199254740991
																},
																"unit": {
																	"type": "string",
																	"enum": [
																		"DAY",
																		"WEEK",
																		"MONTH",
																		"YEAR"
																	]
																}
															},
															"required": [
																"value",
																"unit"
															]
														},
														"noticePeriod": {
															"type": "object",
															"properties": {
																"value": {
																	"type": "integer",
																	"exclusiveMinimum": 0,
																	"maximum": 9007199254740991
																},
																"unit": {
																	"type": "string",
																	"enum": [
																		"DAY",
																		"WEEK",
																		"MONTH",
																		"YEAR"
																	]
																}
															},
															"required": [
																"value",
																"unit"
															]
														},
														"startDate": {
															"type": "string"
														},
														"endDate": {
															"type": "string"
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														}
													},
													"required": [
														"type"
													]
												}
											]
										},
										{
											"type": "null"
										}
									],
									"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
								},
								"createdAt": {
									"description": "Date and time when the field was created",
									"type": [
										"string",
										"null"
									],
									"format": "date-time"
								},
								"updatedAt": {
									"description": "Date and time when the field was last updated",
									"type": [
										"string",
										"null"
									],
									"format": "date-time"
								}
							},
							"required": [
								"id",
								"documentId",
								"templateId",
								"type",
								"position",
								"fieldMeta",
								"createdAt",
								"updatedAt"
							],
							"example": {
								"id": "cm4k2x9p10009abcd1234efgh",
								"documentId": "cm4k2x9p10003abcd1234efgh",
								"templateId": null,
								"type": "TEXT",
								"position": 0,
								"fieldMeta": {
									"type": "TEXT",
									"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
								},
								"createdAt": "2026-09-28T09:12:00.000Z",
								"updatedAt": "2026-09-28T09:12:00.000Z"
							}
						}
					},
					"productTables": {
						"type": "array",
						"items": {
							"$ref": "#/components/schemas/WebhookProductTable"
						},
						"description": "Every product table on the document, resolved: each row carries the recipient's final `selected` state and `quantity`, and the totals count the selected rows only. Empty when the document has no product table."
					},
					"approvalRequestId": {
						"description": "ID of the document's approval request, or null when it has none. To read it, call `GET /api/v1/approval-requests/{id}`.",
						"type": [
							"string",
							"null"
						]
					},
					"bundleId": {
						"description": "ID of the bundle the document was sent in, or null. Every document in a bundle also fires its own events, so this is the key that groups them. To read the bundle, call `GET /api/v1/bundles/{id}`.",
						"type": [
							"string",
							"null"
						]
					}
				},
				"required": [
					"id",
					"externalId",
					"expiresAt",
					"name",
					"status",
					"documentMeta",
					"createdAt",
					"updatedAt",
					"completedAt",
					"deletedAt",
					"templateId",
					"folderId",
					"responsibleUserId",
					"parties",
					"tags",
					"customFields",
					"content",
					"productTables",
					"approvalRequestId",
					"bundleId"
				]
			},
			"WebhookParty": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "The party ID"
					},
					"documentId": {
						"type": "string",
						"description": "The ID of the document the party belongs to"
					},
					"email": {
						"description": "Signer email address",
						"type": [
							"string",
							"null"
						],
						"format": "email",
						"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
					},
					"name": {
						"type": "string",
						"description": "Signer full name"
					},
					"phone": {
						"description": "Signer phone number (for SMS notifications)",
						"type": [
							"string",
							"null"
						]
					},
					"type": {
						"type": "string",
						"enum": [
							"INDIVIDUAL",
							"COMPANY"
						],
						"description": "Party type: INDIVIDUAL or COMPANY"
					},
					"company": {
						"description": "The company the party signs for, or null for a private individual",
						"type": [
							"object",
							"null"
						],
						"properties": {
							"id": {
								"description": "ID of the linked company in your workspace",
								"type": [
									"string",
									"null"
								]
							},
							"name": {
								"description": "Company name",
								"type": [
									"string",
									"null"
								]
							},
							"orgNumber": {
								"description": "Company organization number",
								"type": [
									"string",
									"null"
								]
							},
							"role": {
								"description": "The party's role or title at the company",
								"type": [
									"string",
									"null"
								]
							}
						},
						"required": [
							"id",
							"name",
							"orgNumber",
							"role"
						]
					},
					"externalId": {
						"description": "Your external reference ID for this signer",
						"type": [
							"string",
							"null"
						]
					},
					"contactId": {
						"description": "ID of the contact this party was created from, if any",
						"type": [
							"string",
							"null"
						]
					},
					"nationalId": {
						"description": "National identity number supplied by the sender when creating the document. Optional — BankID works without it, falling back to a name check. This is input and is never overwritten with what the eID verified: read the verified identity from GET /api/v1/documents/{id}/signatures.",
						"type": [
							"string",
							"null"
						]
					},
					"country": {
						"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
						"type": [
							"string",
							"null"
						]
					},
					"role": {
						"type": "string",
						"enum": [
							"SIGNER",
							"ORGANIZER",
							"REVIEWER"
						],
						"description": "Signer role: SIGNER, ORGANIZER, or REVIEWER"
					},
					"signingOrder": {
						"description": "Order for sequential signing (null for parallel)",
						"type": [
							"number",
							"null"
						]
					},
					"signedAt": {
						"description": "Date and time when the signer signed (null if not signed)",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"readStatus": {
						"type": "string",
						"enum": [
							"NOT_OPENED",
							"OPENED",
							"READ"
						],
						"description": "Read status: NOT_OPENED, OPENED, or READ"
					},
					"signingStatus": {
						"type": "string",
						"enum": [
							"NOT_SIGNED",
							"SIGNED",
							"REJECTED"
						],
						"description": "Signing status: NOT_SIGNED, SIGNED, or REJECTED"
					},
					"delivery": {
						"type": "array",
						"items": {
							"type": "string",
							"enum": [
								"EMAIL",
								"SMS",
								"IN_APP"
							]
						},
						"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
					},
					"signatureMethod": {
						"description": "How the party signs: DRAWING, SE_BANKID, CLICK_TO_SIGN, or another eID.",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"NONE",
							"DRAWING",
							"SE_BANKID",
							"MANUAL",
							"CLICK_TO_SIGN",
							"NO_BANKID_BIOMETRIC",
							"NO_BANKID_HIGH",
							"NO_QES",
							"DK_MITID",
							"DK_MITID_ERHVERV",
							"FI_FTN",
							"NL_IDIN",
							"ZEALID_QES",
							null
						]
					},
					"signVerification": {
						"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"PIN",
							"SMS",
							"EMAIL",
							"SE_BANKID",
							"NO_BANKID_BIOMETRIC",
							"NO_BANKID_HIGH",
							"DK_MITID",
							"DK_MITID_ERHVERV",
							"FI_FTN",
							"NL_IDIN",
							null
						]
					},
					"openVerification": {
						"description": "Verification this party passes before the document opens, in place of the document's `openVerification`: `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null uses the document's. `PIN` only gates signing, so it isn't accepted here.",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"PIN",
							"SMS",
							"EMAIL",
							"SE_BANKID",
							"NO_BANKID_BIOMETRIC",
							"NO_BANKID_HIGH",
							"DK_MITID",
							"DK_MITID_ERHVERV",
							"FI_FTN",
							"NL_IDIN",
							null
						]
					},
					"sendStatus": {
						"description": "Send status: NOT_SENT, SENT, DELIVERED, BOUNCED, or FAILED",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"NOT_SENT",
							"SENT",
							"DELIVERED",
							"BOUNCED",
							"FAILED",
							null
						]
					},
					"identityVerified": {
						"type": "boolean",
						"description": "True when an eID verified this signer — either by signing with one or by passing an eID verification gate."
					},
					"identityMismatch": {
						"type": "boolean",
						"description": "True when an eID completed, the identity did not match the intended signer, and the signature was still recorded — read GET /api/v1/documents/{id}/signatures to see what differed. Stays false when the workspace requires a national ID match to sign and the attempt was refused, because no signature exists; those attempts appear only in the document audit trail."
					},
					"createdAt": {
						"description": "When the party was added to the document",
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"documentId",
					"email",
					"name",
					"phone",
					"type",
					"company",
					"externalId",
					"contactId",
					"nationalId",
					"country",
					"role",
					"signingOrder",
					"signedAt",
					"readStatus",
					"signingStatus",
					"delivery",
					"signatureMethod",
					"signVerification",
					"openVerification",
					"sendStatus",
					"identityVerified",
					"identityMismatch",
					"createdAt"
				]
			},
			"WebhookDocumentSource": {
				"type": "object",
				"properties": {
					"type": {
						"type": "string",
						"enum": [
							"EMAIL_INBOX"
						]
					},
					"senderEmail": {
						"type": "string",
						"description": "Email address that sent the attachment to the workspace inbox."
					},
					"inboxType": {
						"type": "string",
						"enum": [
							"ARCHIVE",
							"CREATE"
						],
						"description": "`ARCHIVE` when the attachment was imported as an archived document with status `IMPORTED`, `CREATE` when it became a `DRAFT` document."
					}
				},
				"required": [
					"type",
					"senderEmail",
					"inboxType"
				],
				"description": "How the document was created. Null for a document created in the app or through the API."
			},
			"WebhookProductTable": {
				"type": "object",
				"properties": {
					"fieldId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"currency": {
						"description": "ISO 4217; null on tables authored before currencies",
						"type": [
							"string",
							"null"
						]
					},
					"language": {
						"type": "string",
						"enum": [
							"sv",
							"en",
							"no",
							"da",
							"fi",
							"de",
							"is",
							"es",
							"fr",
							"it"
						]
					},
					"allowSelection": {
						"type": "boolean"
					},
					"selectionPartyId": {
						"description": "The party who makes the selection",
						"type": [
							"string",
							"null"
						]
					},
					"selectionRequired": {
						"type": "boolean"
					},
					"sections": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"pickOne": {
									"type": "boolean"
								}
							},
							"required": [
								"id",
								"name",
								"pickOne"
							]
						}
					},
					"rows": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"sku": {
									"type": [
										"string",
										"null"
									]
								},
								"name": {
									"type": "string"
								},
								"description": {
									"type": [
										"string",
										"null"
									]
								},
								"unit": {
									"type": [
										"string",
										"null"
									]
								},
								"price": {
									"type": "number",
									"description": "Unit price as a decimal amount in the table's currency, such as `1499.5`, not in minor units. It excludes VAT unless the table's prices include VAT."
								},
								"vat": {
									"type": "number",
									"description": "VAT rate in percent, such as `25`. Falls back to the table's default rate."
								},
								"billing": {
									"type": "string",
									"enum": [
										"ONE_TIME",
										"MONTHLY",
										"QUARTERLY",
										"YEARLY"
									]
								},
								"discount": {
									"description": "Row discount, off the row amount",
									"type": [
										"object",
										"null"
									],
									"properties": {
										"type": {
											"type": "string",
											"enum": [
												"PERCENT",
												"AMOUNT"
											]
										},
										"value": {
											"type": "number"
										}
									},
									"required": [
										"type",
										"value"
									]
								},
								"optional": {
									"type": "boolean",
									"description": "The recipient may choose whether to include this row"
								},
								"selected": {
									"type": "boolean",
									"description": "Whether the row counts towards the totals. Declined rows are still listed, with false."
								},
								"quantity": {
									"type": "number",
									"description": "Final quantity, including a recipient-set one"
								},
								"lineTotal": {
									"type": "number",
									"description": "price × quantity − discount, in the basis the price was entered in"
								},
								"lineNet": {
									"type": "number",
									"description": "Line amount excluding VAT"
								},
								"lineVat": {
									"type": "number",
									"description": "VAT on the line"
								},
								"sectionId": {
									"type": [
										"string",
										"null"
									]
								},
								"productType": {
									"type": [
										"string",
										"null"
									],
									"enum": [
										"GOODS",
										"SERVICE",
										"ROT",
										"RUT",
										null
									]
								}
							},
							"required": [
								"id",
								"sku",
								"name",
								"description",
								"unit",
								"price",
								"vat",
								"billing",
								"discount",
								"optional",
								"selected",
								"quantity",
								"lineTotal",
								"lineNet",
								"lineVat",
								"sectionId",
								"productType"
							]
						},
						"description": "Every row, selected or not, in table order"
					},
					"totals": {
						"type": "object",
						"properties": {
							"subtotal": {
								"type": "number",
								"description": "Net, before the table discount"
							},
							"discountAmount": {
								"type": "number"
							},
							"vatAmount": {
								"type": "number"
							},
							"total": {
								"type": "number"
							},
							"rotDeduction": {
								"type": "number"
							},
							"rutDeduction": {
								"type": "number"
							},
							"payable": {
								"type": "number",
								"description": "total − ROT/RUT deductions"
							},
							"byBilling": {
								"type": "object",
								"additionalProperties": {
									"type": "object",
									"properties": {
										"subtotal": {
											"type": "number"
										},
										"vatAmount": {
											"type": "number"
										},
										"total": {
											"type": "number"
										}
									},
									"required": [
										"subtotal",
										"vatAmount",
										"total"
									]
								}
							}
						},
						"required": [
							"subtotal",
							"discountAmount",
							"vatAmount",
							"total",
							"rotDeduction",
							"rutDeduction",
							"payable",
							"byBilling"
						],
						"description": "Computed from the selected rows only. Every amount in a summary is a decimal amount in the table's currency, rounded to two decimals, not in minor units."
					}
				},
				"required": [
					"fieldId",
					"name",
					"currency",
					"language",
					"allowSelection",
					"selectionPartyId",
					"selectionRequired",
					"sections",
					"rows",
					"totals"
				]
			},
			"WebhookIdentityCheck": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string"
					},
					"organizationId": {
						"type": "string"
					},
					"fullName": {
						"type": "string",
						"description": "Full name of the person to verify."
					},
					"email": {
						"description": "Email address the link goes to on the `EMAIL` channel.",
						"type": [
							"string",
							"null"
						]
					},
					"phone": {
						"description": "Phone number the link goes to on the `SMS` channel.",
						"type": [
							"string",
							"null"
						]
					},
					"channel": {
						"type": "string",
						"enum": [
							"EMAIL",
							"SMS",
							"IN_APP"
						],
						"description": "How the recipient got the verification link."
					},
					"status": {
						"type": "string",
						"enum": [
							"CREATED",
							"SENT",
							"OPENED",
							"VERIFIED",
							"FAILED",
							"EXPIRED",
							"CANCELLED"
						],
						"description": "sajn ID Status:\n- CREATED: Verification created but not sent\n- SENT: Verification sent to recipient\n- OPENED: Recipient opened verification link\n- VERIFIED: Identity successfully verified\n- FAILED: Verification failed\n- EXPIRED: Verification link expired\n- CANCELLED: Verification was cancelled"
					},
					"reference": {
						"description": "Your own reference for the check.",
						"type": [
							"string",
							"null"
						]
					},
					"language": {
						"description": "ISO 639-1 language code, such as `sv` or `en`. `GET /api/v1/helpers/languages` lists them.",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"sv",
							"en",
							"no",
							"da",
							"fi",
							"de",
							"is",
							"es",
							"fr",
							"it",
							null
						]
					},
					"expiresAt": {
						"description": "When the identity check and its link expire.",
						"type": "string",
						"format": "date-time"
					},
					"verifiedAt": {
						"description": "When the person was verified. Null until then.",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"verificationUrl": {
						"description": "The verification link. Set only in the response to the create request; null otherwise.",
						"type": [
							"string",
							"null"
						]
					},
					"contact": {
						"description": "The contact the check is linked to.",
						"type": [
							"object",
							"null"
						],
						"properties": {
							"id": {
								"type": "string"
							},
							"firstName": {
								"type": "string"
							},
							"lastName": {
								"type": "string"
							},
							"email": {
								"type": [
									"string",
									"null"
								]
							},
							"phone": {
								"type": [
									"string",
									"null"
								]
							}
						},
						"required": [
							"id",
							"firstName",
							"lastName",
							"email",
							"phone"
						]
					},
					"createdBy": {
						"description": "The user who created the check.",
						"anyOf": [
							{
								"$ref": "#/components/schemas/WebhookUser"
							},
							{
								"type": "null"
							}
						]
					},
					"audits": {
						"description": "What happened to the check, newest first. Null in lists and in the response to the create request.",
						"type": [
							"array",
							"null"
						],
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string",
									"description": "Audit log entry ID"
								},
								"type": {
									"type": "string",
									"description": "Event type (e.g., ID_CREATED, ID_SENT, ID_VERIFIED)"
								},
								"createdAt": {
									"description": "When this event occurred",
									"type": "string",
									"format": "date-time"
								},
								"data": {
									"type": "object",
									"additionalProperties": {},
									"description": "Event-specific data"
								},
								"name": {
									"description": "Name of person who triggered this event",
									"type": [
										"string",
										"null"
									]
								},
								"email": {
									"description": "Email of person who triggered this event",
									"type": [
										"string",
										"null"
									]
								},
								"ipAddress": {
									"description": "IP address of request",
									"type": [
										"string",
										"null"
									]
								},
								"userAgent": {
									"description": "User agent of request",
									"type": [
										"string",
										"null"
									]
								}
							},
							"required": [
								"id",
								"type",
								"createdAt",
								"data",
								"name",
								"email",
								"ipAddress",
								"userAgent"
							]
						}
					},
					"data": {
						"description": "Verification data, such as the BankID result. Null in lists and in the response to the create request.",
						"type": [
							"object",
							"null"
						],
						"additionalProperties": {}
					}
				},
				"required": [
					"id",
					"organizationId",
					"fullName",
					"email",
					"phone",
					"channel",
					"status",
					"reference",
					"language",
					"expiresAt",
					"verifiedAt",
					"createdAt",
					"updatedAt",
					"verificationUrl",
					"contact",
					"createdBy",
					"audits",
					"data"
				]
			},
			"WebhookContact": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Unique contact identifier"
					},
					"email": {
						"description": "Contact email address",
						"type": [
							"string",
							"null"
						]
					},
					"phone": {
						"description": "Contact phone number",
						"type": [
							"string",
							"null"
						]
					},
					"firstName": {
						"type": "string",
						"description": "Contact first name"
					},
					"lastName": {
						"type": "string",
						"description": "Contact last name"
					},
					"nationalId": {
						"description": "National identity number, such as a Swedish personnummer",
						"type": [
							"string",
							"null"
						]
					},
					"externalId": {
						"description": "Your external reference ID",
						"type": [
							"string",
							"null"
						]
					},
					"addressLine1": {
						"description": "First line of the street address",
						"type": [
							"string",
							"null"
						]
					},
					"addressLine2": {
						"description": "Second line of the street address, such as a c/o line",
						"type": [
							"string",
							"null"
						]
					},
					"postalCode": {
						"description": "Postal code of the address",
						"type": [
							"string",
							"null"
						]
					},
					"city": {
						"description": "City of the address",
						"type": [
							"string",
							"null"
						]
					},
					"state": {
						"description": "State or region of the address",
						"type": [
							"string",
							"null"
						]
					},
					"country": {
						"description": "Country of the address, as free text, as it was entered or imported. It isn't a country code, unlike a party's `country`.",
						"type": [
							"string",
							"null"
						]
					},
					"createdAt": {
						"description": "Date and time when contact was created",
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"description": "Date and time when contact was last updated",
						"type": "string",
						"format": "date-time"
					},
					"companyRole": {
						"description": "Role/title within the associated company",
						"type": [
							"string",
							"null"
						]
					},
					"company": {
						"description": "The company the contact belongs to",
						"anyOf": [
							{
								"$ref": "#/components/schemas/WebhookCompany"
							},
							{
								"type": "null"
							}
						]
					}
				},
				"required": [
					"id",
					"email",
					"phone",
					"firstName",
					"lastName",
					"nationalId",
					"externalId",
					"addressLine1",
					"addressLine2",
					"postalCode",
					"city",
					"state",
					"country",
					"createdAt",
					"updatedAt",
					"companyRole",
					"company"
				],
				"example": {
					"id": "cm4k2x9p10006abcd1234efgh",
					"email": "kai@example.com",
					"phone": "+46701740605",
					"firstName": "Kai",
					"lastName": "Lindqvist",
					"nationalId": "191212121212",
					"externalId": "EMP-0142",
					"addressLine1": "Storgatan 12",
					"addressLine2": null,
					"postalCode": "411 38",
					"city": "Göteborg",
					"state": null,
					"country": "Sverige",
					"createdAt": "2026-09-15T10:30:00.000Z",
					"updatedAt": "2026-09-15T10:30:00.000Z",
					"companyRole": null,
					"company": null
				}
			},
			"WebhookCompany": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Unique company identifier"
					},
					"name": {
						"description": "Company name",
						"type": [
							"string",
							"null"
						]
					},
					"orgNumber": {
						"description": "Organization number, without a hyphen",
						"type": [
							"string",
							"null"
						]
					},
					"country": {
						"description": "Country code of the company, such as SE",
						"type": [
							"string",
							"null"
						]
					},
					"createdAt": {
						"description": "Date and time when the company was created",
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"description": "Date and time when the company was last updated",
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"name",
					"orgNumber",
					"country",
					"createdAt",
					"updatedAt"
				]
			},
			"WebhookTemplate": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Unique template identifier"
					},
					"name": {
						"type": "string",
						"description": "Template name/title"
					},
					"workspaceId": {
						"description": "Workspace ID this template belongs to",
						"type": [
							"string",
							"null"
						]
					},
					"organizationId": {
						"description": "Organization ID this template belongs to",
						"type": [
							"string",
							"null"
						]
					},
					"createdBy": {
						"description": "The user who created the template",
						"$ref": "#/components/schemas/WebhookUser"
					},
					"isGlobal": {
						"type": "boolean",
						"description": "Whether this is a global template"
					},
					"templateMeta": {
						"description": "The settings that documents created from the template start with",
						"type": [
							"object",
							"null"
						],
						"properties": {
							"signingMode": {
								"description": "If `PARALLEL`, every party can sign at once. If `SEQUENTIAL`, the parties sign one at a time, in `signingOrder`.",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"PARALLEL",
									"SEQUENTIAL",
									null
								]
							},
							"forceReadFullDocument": {
								"description": "Whether signers must read the entire document before signing",
								"type": [
									"boolean",
									"null"
								]
							},
							"showChatToSigners": {
								"description": "Whether to show document chat to signers",
								"type": [
									"boolean",
									"null"
								]
							},
							"language": {
								"description": "Language of the signing page and the emails to the parties, an ISO 639-1 code such as `sv`",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"sv",
									"en",
									"no",
									"da",
									"fi",
									"de",
									"is",
									"es",
									"fr",
									"it",
									null
								]
							},
							"value": {
								"description": "The document's value, such as a contract amount, as free text. It isn't an amount of money in minor units.",
								"type": [
									"string",
									"null"
								]
							},
							"signableAfterExpired": {
								"description": "Whether documents created from this template remain signable after expiration",
								"type": [
									"boolean",
									"null"
								]
							},
							"sendPlainTextEmailOnly": {
								"description": "Send plain text email invitations only (no HTML)",
								"type": [
									"boolean",
									"null"
								]
							},
							"allowDelegation": {
								"description": "Whether signers may delegate signing to another person",
								"type": [
									"boolean",
									"null"
								]
							},
							"reminderIntervalDays": {
								"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
								"type": [
									"integer",
									"null"
								],
								"minimum": -9007199254740991,
								"maximum": 9007199254740991
							},
							"responsibleUserId": {
								"description": "Default responsible user ID",
								"type": [
									"string",
									"null"
								]
							},
							"openVerification": {
								"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"PIN",
									"SMS",
									"EMAIL",
									"SE_BANKID",
									"NO_BANKID_BIOMETRIC",
									"NO_BANKID_HIGH",
									"DK_MITID",
									"DK_MITID_ERHVERV",
									"FI_FTN",
									"NL_IDIN",
									null
								]
							},
							"internalRecipients": {
								"description": "Email addresses that receive a copy of the sealed PDF once a document created from this template is completed",
								"type": [
									"array",
									"null"
								],
								"items": {
									"type": "string"
								}
							},
							"visibility": {
								"description": "Who can see documents created from this template: EVERYONE, RESPONSIBLE, PERMISSION, or USER_SPECIFIC",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"EVERYONE",
									"RESPONSIBLE",
									"PERMISSION",
									"USER_SPECIFIC",
									null
								]
							},
							"selectedUserIds": {
								"description": "User IDs granted access when visibility is USER_SPECIFIC",
								"type": [
									"array",
									"null"
								],
								"items": {
									"type": "string"
								}
							},
							"nationalIdDisplayMode": {
								"description": "How national identity numbers are displayed to signers: FULL, PARTIAL, or NONE. null inherits the workspace default.",
								"type": [
									"string",
									"null"
								],
								"enum": [
									"FULL",
									"PARTIAL",
									"NONE",
									null
								]
							},
							"sameDeviceSigning": {
								"description": "Whether all parties sign in sequence on one device",
								"type": [
									"boolean",
									"null"
								]
							},
							"documentCategoryId": {
								"description": "Document category (Dokumenttyp) applied to documents created from this template. See GET /api/v1/document-categories.",
								"type": [
									"string",
									"null"
								]
							}
						},
						"required": [
							"signingMode",
							"forceReadFullDocument",
							"showChatToSigners",
							"language",
							"value",
							"signableAfterExpired",
							"sendPlainTextEmailOnly",
							"allowDelegation",
							"reminderIntervalDays",
							"responsibleUserId",
							"openVerification",
							"internalRecipients",
							"visibility",
							"selectedUserIds",
							"nationalIdDisplayMode",
							"sameDeviceSigning",
							"documentCategoryId"
						]
					},
					"parties": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string",
									"description": "Unique template party identifier"
								},
								"templateId": {
									"type": "string",
									"description": "Template ID this party belongs to"
								},
								"name": {
									"type": "string",
									"description": "Party name"
								},
								"email": {
									"description": "Party email address",
									"type": [
										"string",
										"null"
									]
								},
								"phone": {
									"description": "Party phone number",
									"type": [
										"string",
										"null"
									]
								},
								"type": {
									"type": "string",
									"enum": [
										"INDIVIDUAL",
										"COMPANY"
									],
									"description": "Party type: INDIVIDUAL or COMPANY"
								},
								"role": {
									"type": "string",
									"enum": [
										"SIGNER",
										"ORGANIZER",
										"REVIEWER"
									],
									"description": "Party role: SIGNER, ORGANIZER, or REVIEWER"
								},
								"signingOrder": {
									"description": "Order for sequential signing",
									"type": [
										"number",
										"null"
									]
								},
								"contactId": {
									"description": "Linked contact ID",
									"type": [
										"string",
										"null"
									]
								},
								"company": {
									"description": "The company the party signs for, or null for a private individual",
									"type": [
										"object",
										"null"
									],
									"properties": {
										"id": {
											"description": "ID of the linked company in your workspace",
											"type": [
												"string",
												"null"
											]
										},
										"name": {
											"description": "Company name",
											"type": [
												"string",
												"null"
											]
										},
										"orgNumber": {
											"description": "Company organization number",
											"type": [
												"string",
												"null"
											]
										},
										"role": {
											"description": "The party's role or title at the company",
											"type": [
												"string",
												"null"
											]
										}
									},
									"required": [
										"id",
										"name",
										"orgNumber",
										"role"
									]
								},
								"externalId": {
									"description": "External reference ID",
									"type": [
										"string",
										"null"
									]
								},
								"nationalId": {
									"description": "National identity number, such as a Swedish personnummer",
									"type": [
										"string",
										"null"
									]
								},
								"country": {
									"description": "ISO 3166-1 alpha-2 country code of the party, such as SE",
									"type": [
										"string",
										"null"
									]
								},
								"signatureMethod": {
									"description": "Default signature method",
									"type": [
										"string",
										"null"
									],
									"enum": [
										"NONE",
										"DRAWING",
										"SE_BANKID",
										"MANUAL",
										"CLICK_TO_SIGN",
										"NO_BANKID_BIOMETRIC",
										"NO_BANKID_HIGH",
										"NO_QES",
										"DK_MITID",
										"DK_MITID_ERHVERV",
										"FI_FTN",
										"NL_IDIN",
										"ZEALID_QES",
										null
									]
								},
								"delivery": {
									"type": "array",
									"items": {
										"type": "string",
										"enum": [
											"EMAIL",
											"SMS",
											"IN_APP"
										]
									},
									"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
								},
								"signVerification": {
									"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
									"type": [
										"string",
										"null"
									],
									"enum": [
										"PIN",
										"SMS",
										"EMAIL",
										"SE_BANKID",
										"NO_BANKID_BIOMETRIC",
										"NO_BANKID_HIGH",
										"DK_MITID",
										"DK_MITID_ERHVERV",
										"FI_FTN",
										"NL_IDIN",
										null
									]
								},
								"createdAt": {
									"description": "When the party was added to the template",
									"type": "string",
									"format": "date-time"
								},
								"updatedAt": {
									"description": "When the party was last changed",
									"type": "string",
									"format": "date-time"
								}
							},
							"required": [
								"id",
								"templateId",
								"name",
								"email",
								"phone",
								"type",
								"role",
								"signingOrder",
								"contactId",
								"company",
								"externalId",
								"nationalId",
								"country",
								"signatureMethod",
								"delivery",
								"signVerification",
								"createdAt",
								"updatedAt"
							]
						},
						"description": "The default parties that documents created from the template start with"
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"color": {
									"type": "string"
								}
							},
							"required": [
								"id",
								"name",
								"color"
							]
						},
						"description": "Tags applied to this template"
					},
					"content": {
						"description": "The content blocks in position order. Null unless you pass `expand=content` to `GET /api/v1/templates/:id`.",
						"type": [
							"array",
							"null"
						],
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string",
									"description": "Unique field identifier"
								},
								"documentId": {
									"description": "Document this field belongs to",
									"type": [
										"string",
										"null"
									]
								},
								"templateId": {
									"description": "Template this field belongs to",
									"type": [
										"string",
										"null"
									]
								},
								"type": {
									"type": "string",
									"enum": [
										"TEXT",
										"HTML",
										"FORM",
										"PDF",
										"PRODUCT_TABLE",
										"TABLE",
										"SPACER",
										"PAGE_BREAK",
										"DURATION"
									],
									"description": "Field type"
								},
								"position": {
									"type": "number",
									"description": "0-based index of the block among the content blocks. Positions are unique and have no gaps."
								},
								"fieldMeta": {
									"anyOf": [
										{
											"oneOf": [
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"TEXT"
															]
														},
														"content": {
															"type": "string"
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"HTML"
															]
														},
														"content": {
															"type": "string"
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"PDF"
															]
														},
														"value": {
															"type": "string"
														},
														"numPages": {
															"type": "number"
														},
														"pageIndex": {
															"type": "integer",
															"minimum": 0,
															"maximum": 9007199254740991
														},
														"instruction": {
															"type": "string"
														},
														"formFields": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"name": {
																		"type": "string"
																	},
																	"type": {
																		"type": "string",
																		"enum": [
																			"TEXT",
																			"CHECKBOX",
																			"DROPDOWN",
																			"RADIO"
																		]
																	},
																	"page": {
																		"type": "integer",
																		"minimum": 1,
																		"maximum": 9007199254740991,
																		"description": "The page the box is on, counted from 1."
																	},
																	"rect": {
																		"type": "object",
																		"properties": {
																			"x": {
																				"type": "number"
																			},
																			"y": {
																				"type": "number"
																			},
																			"width": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"height": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			}
																		},
																		"required": [
																			"x",
																			"y",
																			"width",
																			"height"
																		],
																		"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																	},
																	"pageWidth": {
																		"type": "number",
																		"exclusiveMinimum": 0
																	},
																	"pageHeight": {
																		"type": "number",
																		"exclusiveMinimum": 0
																	},
																	"pageRotation": {
																		"anyOf": [
																			{
																				"type": "number",
																				"enum": [
																					0
																				]
																			},
																			{
																				"type": "number",
																				"enum": [
																					90
																				]
																			},
																			{
																				"type": "number",
																				"enum": [
																					180
																				]
																			},
																			{
																				"type": "number",
																				"enum": [
																					270
																				]
																			}
																		]
																	},
																	"options": {
																		"type": "array",
																		"items": {
																			"type": "string"
																		}
																	},
																	"required": {
																		"type": "boolean"
																	},
																	"readOnly": {
																		"type": "boolean"
																	},
																	"multiline": {
																		"type": "boolean"
																	},
																	"exportValue": {
																		"type": "string"
																	}
																},
																"required": [
																	"name",
																	"type",
																	"page",
																	"rect",
																	"pageWidth",
																	"pageHeight"
																],
																"additionalProperties": {}
															}
														},
														"formValues": {
															"type": "object",
															"additionalProperties": {
																"type": [
																	"string",
																	"boolean"
																]
															}
														},
														"placedFields": {
															"type": "array",
															"items": {
																"oneOf": [
																	{
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"fontSize": {
																						"type": "number",
																						"minimum": 6,
																						"maximum": 72
																					},
																					"color": {
																						"type": "string",
																						"pattern": "^#[0-9a-fA-F]{6}$"
																					},
																					"bold": {
																						"type": "boolean"
																					},
																					"italic": {
																						"type": "boolean"
																					},
																					"align": {
																						"type": "string",
																						"enum": [
																							"LEFT",
																							"CENTER",
																							"RIGHT"
																						]
																					}
																				}
																			},
																			"kind": {
																				"type": "string",
																				"enum": [
																					"INPUT"
																				]
																			},
																			"inputType": {
																				"type": "string",
																				"enum": [
																					"TEXT",
																					"DATE",
																					"CHECKBOX",
																					"SELECT",
																					"DRAW",
																					"SIGNATURE",
																					"INITIALS"
																				]
																			},
																			"label": {
																				"type": "string"
																			},
																			"fillSource": {
																				"type": "string",
																				"enum": [
																					"SIGNER",
																					"FIXED",
																					"NONE",
																					"VARIABLE"
																				]
																			},
																			"partyId": {
																				"type": "string"
																			},
																			"variableId": {
																				"type": "string"
																			},
																			"identity": {
																				"type": "string",
																				"enum": [
																					"name",
																					"ssn"
																				]
																			},
																			"drawn": {
																				"type": "boolean"
																			},
																			"required": {
																				"type": "boolean"
																			},
																			"options": {
																				"type": "array",
																				"items": {
																					"type": "string"
																				}
																			},
																			"multiline": {
																				"type": "boolean"
																			},
																			"format": {
																				"type": "string",
																				"enum": [
																					"email",
																					"phone",
																					"personnummer",
																					"orgnr",
																					"number"
																				]
																			},
																			"min": {
																				"type": "number"
																			},
																			"max": {
																				"type": "number"
																			},
																			"decimals": {
																				"type": "integer",
																				"minimum": 0,
																				"maximum": 6
																			},
																			"step": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			}
																		},
																		"required": [
																			"id",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight",
																			"kind",
																			"inputType"
																		],
																		"additionalProperties": {}
																	},
																	{
																		"type": "object",
																		"properties": {
																			"id": {
																				"type": "string",
																				"minLength": 1
																			},
																			"page": {
																				"type": "integer",
																				"minimum": 1,
																				"maximum": 9007199254740991,
																				"description": "The page the box is on, counted from 1."
																			},
																			"rect": {
																				"type": "object",
																				"properties": {
																					"x": {
																						"type": "number"
																					},
																					"y": {
																						"type": "number"
																					},
																					"width": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"height": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					}
																				},
																				"required": [
																					"x",
																					"y",
																					"width",
																					"height"
																				],
																				"description": "Position and size of the box. Responses give fractions of the page from 0 to 1, measured from its top-left corner."
																			},
																			"pageWidth": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageHeight": {
																				"type": "number",
																				"exclusiveMinimum": 0
																			},
																			"pageRotation": {
																				"anyOf": [
																					{
																						"type": "number",
																						"enum": [
																							0
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							90
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							180
																						]
																					},
																					{
																						"type": "number",
																						"enum": [
																							270
																						]
																					}
																				]
																			},
																			"name": {
																				"type": "string"
																			},
																			"key": {
																				"type": "string",
																				"pattern": "^[a-z0-9_-]*$"
																			},
																			"locked": {
																				"type": "boolean"
																			},
																			"style": {
																				"type": "object",
																				"properties": {
																					"fontSize": {
																						"type": "number",
																						"minimum": 6,
																						"maximum": 72
																					},
																					"color": {
																						"type": "string",
																						"pattern": "^#[0-9a-fA-F]{6}$"
																					},
																					"bold": {
																						"type": "boolean"
																					},
																					"italic": {
																						"type": "boolean"
																					},
																					"align": {
																						"type": "string",
																						"enum": [
																							"LEFT",
																							"CENTER",
																							"RIGHT"
																						]
																					}
																				}
																			},
																			"kind": {
																				"type": "string",
																				"enum": [
																					"STATIC"
																				]
																			},
																			"content": {
																				"type": "string"
																			},
																			"text": {
																				"type": "string"
																			}
																		},
																		"required": [
																			"id",
																			"page",
																			"rect",
																			"pageWidth",
																			"pageHeight",
																			"kind"
																		],
																		"additionalProperties": {}
																	}
																]
															}
														},
														"locked": {
															"type": "boolean"
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"FORM"
															]
														},
														"columns": {
															"type": "number",
															"minimum": 1
														},
														"fields": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string",
																		"minLength": 1
																	},
																	"key": {
																		"type": "string",
																		"pattern": "^[a-z0-9_-]*$"
																	},
																	"type": {
																		"type": "string",
																		"enum": [
																			"INPUT",
																			"TEXT",
																			"SELECT",
																			"DATEPICKER",
																			"RADIO",
																			"CHECKBOX",
																			"NUMBER",
																			"ATTACHMENT"
																		]
																	},
																	"row": {
																		"type": "number",
																		"minimum": 0
																	},
																	"column": {
																		"type": "number",
																		"minimum": 0
																	},
																	"colSpan": {
																		"type": "integer",
																		"exclusiveMinimum": 0,
																		"maximum": 9007199254740991
																	},
																	"fieldMeta": {
																		"oneOf": [
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"INPUT"
																						]
																					},
																					"value": {
																						"type": "string"
																					},
																					"format": {
																						"type": "string",
																						"enum": [
																							"email",
																							"phone",
																							"personnummer",
																							"orgnr"
																						]
																					},
																					"identity": {
																						"type": "string",
																						"enum": [
																							"name",
																							"ssn"
																						]
																					},
																					"maxLength": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 10000
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"TEXT"
																						]
																					},
																					"value": {
																						"type": "string"
																					},
																					"rows": {
																						"type": "integer",
																						"minimum": 2,
																						"maximum": 20
																					},
																					"maxLength": {
																						"type": "integer",
																						"exclusiveMinimum": 0,
																						"maximum": 10000
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"SELECT"
																						]
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"value"
																							]
																						}
																					},
																					"defaultValue": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"DATEPICKER"
																						]
																					},
																					"value": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"RADIO"
																						]
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"value"
																							]
																						}
																					},
																					"value": {
																						"type": "string"
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"CHECKBOX"
																						]
																					},
																					"options": {
																						"type": "array",
																						"items": {
																							"type": "object",
																							"properties": {
																								"value": {
																									"type": "string"
																								}
																							},
																							"required": [
																								"value"
																							]
																						}
																					},
																					"values": {
																						"type": "array",
																						"items": {
																							"type": "string"
																						}
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"NUMBER"
																						]
																					},
																					"value": {
																						"type": "string"
																					},
																					"min": {
																						"type": "number"
																					},
																					"max": {
																						"type": "number"
																					},
																					"decimals": {
																						"type": "integer",
																						"minimum": 0,
																						"maximum": 6
																					},
																					"step": {
																						"type": "number",
																						"exclusiveMinimum": 0
																					},
																					"unit": {
																						"type": "string",
																						"maxLength": 12
																					}
																				},
																				"required": [
																					"type"
																				]
																			},
																			{
																				"type": "object",
																				"properties": {
																					"label": {
																						"type": "string"
																					},
																					"placeholder": {
																						"type": "string"
																					},
																					"description": {
																						"type": "string"
																					},
																					"partyId": {
																						"type": [
																							"string",
																							"null"
																						]
																					},
																					"required": {
																						"type": "boolean"
																					},
																					"type": {
																						"type": "string",
																						"enum": [
																							"ATTACHMENT"
																						]
																					},
																					"appendixLabel": {
																						"type": "string"
																					},
																					"allowedTypes": {
																						"type": "array",
																						"items": {
																							"type": "string",
																							"enum": [
																								"PDF",
																								"IMAGE"
																							]
																						}
																					},
																					"includeInDocument": {
																						"type": "boolean"
																					},
																					"value": {
																						"type": "object",
																						"properties": {
																							"filename": {
																								"type": "string"
																							},
																							"mimeType": {
																								"type": "string"
																							},
																							"size": {
																								"type": "number",
																								"description": "Size in bytes"
																							}
																						},
																						"required": [
																							"filename",
																							"mimeType",
																							"size"
																						],
																						"additionalProperties": {},
																						"description": "The file the party uploaded. Set by sajn when the upload is confirmed; a request can't set it."
																					}
																				},
																				"required": [
																					"type"
																				]
																			}
																		]
																	}
																},
																"required": [
																	"id",
																	"row",
																	"column"
																]
															}
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type",
														"columns",
														"fields"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"PRODUCT_TABLE"
															]
														},
														"name": {
															"type": "string"
														},
														"enableName": {
															"type": "boolean"
														},
														"columns": {
															"type": "object",
															"additionalProperties": {
																"type": "object",
																"properties": {
																	"name": {
																		"type": "string"
																	},
																	"originalName": {
																		"type": "string"
																	},
																	"enabled": {
																		"type": "boolean"
																	},
																	"key": {},
																	"settings": {
																		"type": "object",
																		"properties": {
																			"decimalPlaces": {
																				"type": "number"
																			},
																			"oneTimePayment": {
																				"type": "boolean"
																			},
																			"pricePrefix": {
																				"type": "string"
																			},
																			"priceSuffix": {
																				"type": "string"
																			},
																			"pricesIncludeVat": {
																				"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																				"type": "boolean"
																			},
																			"defaultVatRate": {
																				"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																				"type": "number"
																			},
																			"showVatBreakdown": {
																				"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																				"type": "boolean"
																			}
																		}
																	}
																},
																"required": [
																	"name",
																	"originalName",
																	"enabled",
																	"key",
																	"settings"
																]
															}
														},
														"summaryLabels": {
															"type": "object",
															"properties": {
																"subtotal": {
																	"type": "string"
																},
																"vat": {
																	"type": "string"
																},
																"total": {
																	"type": "string"
																},
																"payable": {
																	"type": "string"
																}
															},
															"required": [
																"subtotal",
																"vat",
																"total"
															]
														},
														"allowSelection": {
															"type": "boolean"
														},
														"selectionPartyId": {
															"type": "string"
														},
														"selectionRequired": {
															"type": "boolean"
														},
														"selectedProductIds": {
															"type": "array",
															"items": {
																"type": "string"
															}
														},
														"recipientChoice": {
															"type": "object",
															"properties": {
																"selectedIds": {
																	"type": "array",
																	"items": {
																		"type": "string"
																	}
																},
																"quantities": {
																	"type": "object",
																	"additionalProperties": {
																		"type": "number"
																	}
																}
															},
															"required": [
																"selectedIds",
																"quantities"
															]
														},
														"payment": {
															"description": "Collects a payment from one party in the signing flow. The payment is authorized before the party signs and captured when the document completes, on the organization's connected payment account.",
															"type": "object",
															"properties": {
																"enabled": {
																	"type": "boolean"
																},
																"payerPartyId": {
																	"description": "The party who pays. Without it, `selectionPartyId` pays.",
																	"type": "string"
																},
																"basis": {
																	"description": "`ONE_TIME` charges the one-time rows. `FIRST_PERIOD` adds one period of every recurring row. Default: `ONE_TIME`.",
																	"type": "string",
																	"enum": [
																		"ONE_TIME",
																		"FIRST_PERIOD"
																	]
																},
																"percent": {
																	"description": "The share of the basis to charge, from 1 to 100, such as `30` for a deposit. Default: `100`.",
																	"type": "integer",
																	"minimum": 1,
																	"maximum": 100
																}
															},
															"required": [
																"enabled"
															]
														},
														"sections": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"pickOne": {
																		"type": "boolean"
																	},
																	"showSubtotal": {
																		"type": "boolean"
																	}
																},
																"required": [
																	"id",
																	"name"
																]
															}
														},
														"discount": {
															"type": "object",
															"properties": {
																"type": {
																	"type": "string",
																	"enum": [
																		"PERCENT",
																		"AMOUNT"
																	]
																},
																"value": {
																	"type": "number"
																},
																"label": {
																	"type": "string"
																}
															},
															"required": [
																"type",
																"value"
															]
														},
														"pricing": {
															"type": "object",
															"properties": {
																"pricesIncludeVat": {
																	"description": "If `true`, the entered prices include VAT. If `false`, they exclude it. Default: `false`.",
																	"type": "boolean"
																},
																"defaultVatRate": {
																	"description": "VAT rate in percent, such as `25`, for a product without its own `vat`. Default: `25`.",
																	"type": "number"
																},
																"showVatBreakdown": {
																	"description": "If `true`, the totals show the VAT amount. Default: `true`.",
																	"type": "boolean"
																}
															}
														},
														"style": {
															"type": "object",
															"properties": {
																"border": {
																	"type": "boolean"
																},
																"rounded": {
																	"type": "boolean"
																}
															}
														},
														"currency": {
															"description": "ISO 4217 currency code, such as `SEK`. Every price in the table is a decimal amount in this currency.",
															"type": "string",
															"pattern": "^[A-Z]{3}$"
														},
														"language": {
															"type": "string",
															"enum": [
																"sv",
																"en",
																"no",
																"da",
																"fi",
																"de",
																"is",
																"es",
																"fr",
																"it"
															]
														},
														"products": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"description": {
																		"type": "string"
																	},
																	"price": {
																		"description": "Unit price as a decimal amount in the table's `currency`, such as `1499.5`, not in minor units. It excludes VAT unless `pricing.pricesIncludeVat` is `true`.",
																		"type": "number"
																	},
																	"unit": {
																		"type": "string"
																	},
																	"quantity": {
																		"type": "number"
																	},
																	"vat": {
																		"description": "VAT rate in percent, such as `25`. Without it, `pricing.defaultVatRate` applies.",
																		"type": "number"
																	},
																	"optional": {
																		"type": "boolean"
																	},
																	"defaultSelected": {
																		"type": "boolean"
																	},
																	"quantityEditable": {
																		"type": "boolean"
																	},
																	"quantityMin": {
																		"type": "number"
																	},
																	"quantityMax": {
																		"type": "number"
																	},
																	"discount": {
																		"type": "object",
																		"properties": {
																			"type": {
																				"type": "string",
																				"enum": [
																					"PERCENT",
																					"AMOUNT"
																				]
																			},
																			"value": {
																				"type": "number"
																			}
																		},
																		"required": [
																			"type",
																			"value"
																		]
																	},
																	"billing": {
																		"type": "string",
																		"enum": [
																			"ONE_TIME",
																			"MONTHLY",
																			"QUARTERLY",
																			"YEARLY"
																		]
																	},
																	"sectionId": {
																		"type": "string"
																	},
																	"sku": {
																		"type": "string"
																	},
																	"productId": {
																		"type": "string"
																	},
																	"productType": {
																		"type": "string",
																		"enum": [
																			"GOODS",
																			"SERVICE",
																			"ROT",
																			"RUT"
																		]
																	}
																},
																"required": [
																	"id",
																	"name"
																]
															}
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type",
														"name",
														"columns",
														"products"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"TABLE"
															]
														},
														"columns": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"name": {
																		"type": "string"
																	},
																	"type": {
																		"type": "string",
																		"enum": [
																			"TEXT",
																			"NUMBER"
																		]
																	}
																},
																"required": [
																	"id",
																	"name",
																	"type"
																]
															}
														},
														"rows": {
															"type": "array",
															"items": {
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string"
																	},
																	"cells": {
																		"type": "array",
																		"items": {
																			"type": "object",
																			"properties": {
																				"columnId": {
																					"type": "string"
																				},
																				"value": {
																					"type": [
																						"string",
																						"number"
																					]
																				}
																			},
																			"required": [
																				"columnId",
																				"value"
																			]
																		}
																	}
																},
																"required": [
																	"id",
																	"cells"
																]
															}
														},
														"showHeaders": {
															"type": "boolean"
														},
														"style": {
															"type": "object",
															"properties": {
																"border": {
																	"type": "boolean"
																},
																"rounded": {
																	"type": "boolean"
																}
															}
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														},
														"visibilityRule": {
															"type": "object",
															"properties": {
																"customFieldId": {
																	"type": "string",
																	"minLength": 1
																},
																"equals": {
																	"type": "string"
																},
																"mode": {
																	"type": "string",
																	"enum": [
																		"SHOW_WHEN",
																		"HIDE_WHEN"
																	]
																}
															},
															"required": [
																"customFieldId",
																"equals",
																"mode"
															]
														},
														"hidden": {
															"type": "boolean"
														}
													},
													"required": [
														"type",
														"columns",
														"rows"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"SPACER"
															]
														},
														"size": {
															"type": "string",
															"enum": [
																"S",
																"M",
																"L",
																"XL"
															]
														},
														"locked": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"PAGE_BREAK"
															]
														},
														"locked": {
															"type": "boolean"
														}
													},
													"required": [
														"type"
													]
												},
												{
													"type": "object",
													"properties": {
														"type": {
															"type": "string",
															"enum": [
																"DURATION"
															]
														},
														"durationType": {
															"type": "string",
															"enum": [
																"NONE",
																"SINGLE_PERIOD",
																"RECURRING",
																"RECURRING_WITH_INITIAL",
																"NOT_SET"
															]
														},
														"period": {
															"type": "object",
															"properties": {
																"value": {
																	"type": "integer",
																	"exclusiveMinimum": 0,
																	"maximum": 9007199254740991
																},
																"unit": {
																	"type": "string",
																	"enum": [
																		"DAY",
																		"WEEK",
																		"MONTH",
																		"YEAR"
																	]
																}
															},
															"required": [
																"value",
																"unit"
															]
														},
														"noticePeriod": {
															"type": "object",
															"properties": {
																"value": {
																	"type": "integer",
																	"exclusiveMinimum": 0,
																	"maximum": 9007199254740991
																},
																"unit": {
																	"type": "string",
																	"enum": [
																		"DAY",
																		"WEEK",
																		"MONTH",
																		"YEAR"
																	]
																}
															},
															"required": [
																"value",
																"unit"
															]
														},
														"startDate": {
															"type": "string"
														},
														"endDate": {
															"type": "string"
														},
														"locked": {
															"type": "boolean"
														},
														"sectionStyle": {
															"type": "object",
															"properties": {
																"background": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"MUTED",
																		"TINT",
																		"ACCENT",
																		"DARK"
																	]
																},
																"padding": {
																	"type": "string",
																	"enum": [
																		"NONE",
																		"SM",
																		"MD",
																		"LG"
																	]
																},
																"bleed": {
																	"type": "boolean"
																},
																"border": {
																	"type": "boolean"
																}
															}
														}
													},
													"required": [
														"type"
													]
												}
											]
										},
										{
											"type": "null"
										}
									],
									"description": "Type-specific content. For PDF fields this includes `placedFields` (boxes placed on the PDF pages) and `formFields` (form fields extracted from the PDF)."
								},
								"createdAt": {
									"description": "Date and time when the field was created",
									"type": [
										"string",
										"null"
									],
									"format": "date-time"
								},
								"updatedAt": {
									"description": "Date and time when the field was last updated",
									"type": [
										"string",
										"null"
									],
									"format": "date-time"
								}
							},
							"required": [
								"id",
								"documentId",
								"templateId",
								"type",
								"position",
								"fieldMeta",
								"createdAt",
								"updatedAt"
							],
							"example": {
								"id": "cm4k2x9p10009abcd1234efgh",
								"documentId": "cm4k2x9p10003abcd1234efgh",
								"templateId": null,
								"type": "TEXT",
								"position": 0,
								"fieldMeta": {
									"type": "TEXT",
									"content": "<p>Anställningen gäller tills vidare från och med den 1 november 2026, med sex månaders provanställning.</p>"
								},
								"createdAt": "2026-09-28T09:12:00.000Z",
								"updatedAt": "2026-09-28T09:12:00.000Z"
							}
						}
					},
					"createdAt": {
						"description": "Date and time when the template was created",
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"description": "Date and time when the template was last updated",
						"type": "string",
						"format": "date-time"
					},
					"deletedAt": {
						"description": "Date and time when the template was moved to the trash. Null unless the response is to `DELETE /api/v1/templates/:id`.",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"name",
					"workspaceId",
					"organizationId",
					"createdBy",
					"isGlobal",
					"templateMeta",
					"parties",
					"tags",
					"content",
					"createdAt",
					"updatedAt",
					"deletedAt"
				]
			},
			"WebhookMember": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "User ID of the member. Address the member with it in `/api/v1/members/{userId}`."
					},
					"email": {
						"type": "string"
					},
					"name": {
						"description": "Full name. Null when the user has no name.",
						"type": [
							"string",
							"null"
						]
					},
					"role": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"required": [
							"id",
							"name"
						],
						"description": "Workspace role"
					},
					"status": {
						"type": "string",
						"enum": [
							"ACTIVE",
							"INACTIVE"
						],
						"description": "`ACTIVE` once the member has signed in at least once"
					},
					"lastActiveAt": {
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"joinedAt": {
						"description": "When the user was added to the workspace",
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"email",
					"name",
					"role",
					"status",
					"lastActiveAt",
					"joinedAt"
				],
				"description": "Workspace member"
			},
			"WebhookFormSubmission": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string"
					},
					"formId": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"STARTED",
							"SUBMITTED",
							"COMPLETED",
							"EXPIRED"
						]
					},
					"respondentName": {
						"type": [
							"string",
							"null"
						]
					},
					"respondentEmail": {
						"type": [
							"string",
							"null"
						]
					},
					"respondentPhone": {
						"type": [
							"string",
							"null"
						]
					},
					"answers": {
						"type": [
							"object",
							"null"
						],
						"additionalProperties": {}
					},
					"documentId": {
						"type": [
							"string",
							"null"
						]
					},
					"startedAt": {
						"type": "string",
						"format": "date-time"
					},
					"submittedAt": {
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"formId",
					"status",
					"respondentName",
					"respondentEmail",
					"respondentPhone",
					"answers",
					"documentId",
					"startedAt",
					"submittedAt",
					"updatedAt"
				]
			},
			"WebhookWorkspace": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"organizationId": {
						"type": "string"
					},
					"createdBy": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/WebhookUser"
							},
							{
								"type": "null"
							}
						],
						"description": "The user who created the workspace. Null when the user no longer exists."
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"slug",
					"name",
					"organizationId",
					"createdBy",
					"createdAt"
				]
			},
			"WebhookLoginSession": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"PENDING",
							"COMPLETED",
							"FAILED",
							"EXPIRED"
						]
					},
					"method": {
						"description": "The eID the user authenticated with, such as `SE_BANKID`. Null until `status` is `COMPLETED`.",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"SE_BANKID",
							"NO_BANKID_BIOMETRIC",
							"NO_BANKID_HIGH",
							"NO_QES",
							"DK_MITID",
							"DK_MITID_ERHVERV",
							"FI_FTN",
							"NL_IDIN",
							"ZEALID_QES",
							null
						]
					},
					"completedAt": {
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"state": {
						"type": [
							"string",
							"null"
						]
					},
					"sub": {
						"type": [
							"string",
							"null"
						]
					},
					"claims": {
						"type": [
							"object",
							"null"
						],
						"properties": {
							"sub": {
								"type": "string"
							},
							"amr": {
								"type": "array",
								"items": {
									"type": "string"
								}
							},
							"auth_time": {
								"type": "number"
							},
							"name": {
								"type": [
									"string",
									"null"
								]
							},
							"given_name": {
								"type": [
									"string",
									"null"
								]
							},
							"family_name": {
								"type": [
									"string",
									"null"
								]
							},
							"birthdate": {
								"type": [
									"string",
									"null"
								]
							},
							"nin": {
								"type": [
									"string",
									"null"
								]
							},
							"nin_type": {
								"type": [
									"string",
									"null"
								]
							}
						},
						"required": [
							"sub",
							"amr",
							"auth_time",
							"name",
							"given_name",
							"family_name",
							"birthdate",
							"nin",
							"nin_type"
						],
						"description": "The claims your client is approved for. A claim it isn't approved for is null."
					},
					"loginUrl": {
						"description": "Open this in a browser or an in-app browser to authenticate the user. Set only in the response to the create request; null otherwise.",
						"type": [
							"string",
							"null"
						]
					},
					"expiresAt": {
						"description": "When the user must have authenticated by. Set only in the response to the create request; null otherwise.",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"status",
					"method",
					"completedAt",
					"state",
					"sub",
					"claims",
					"loginUrl",
					"expiresAt"
				],
				"description": "The login session, as `GET /api/v1/login/sessions/{id}` returns it, except that `claims` is null: read the claims with that request. With `mode` `OIDC`, there's no session to read; your client gets the claims in the `id_token`."
			},
			"WebhookDocumentCreatedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"source": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/WebhookDocumentSource"
							},
							{
								"type": "null"
							}
						]
					}
				},
				"required": [
					"object",
					"source"
				]
			},
			"WebhookDocumentData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookDocumentExpirationExtendedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"previousAttributes": {
						"type": "object",
						"properties": {
							"expiresAt": {
								"type": [
									"string",
									"null"
								],
								"format": "date-time"
							}
						},
						"required": [
							"expiresAt"
						],
						"description": "The values the changed fields of `object` had before the event."
					}
				},
				"required": [
					"object",
					"previousAttributes"
				]
			},
			"WebhookPartyData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"party": {
						"description": "The party the event is about, as `GET /api/v1/documents/{id}/parties` lists it.",
						"$ref": "#/components/schemas/WebhookParty"
					}
				},
				"required": [
					"object",
					"party"
				]
			},
			"WebhookDocumentCompletedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"fieldValues": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"key": {
									"type": "string",
									"description": "The key you send to fill in this value. For a FORM subfield or a placed box, this is the key set in the editor, or the element ID when no key is set. For an AcroForm field, this is the field name in the PDF."
								},
								"label": {
									"type": "string",
									"description": "The label shown to the sender or party."
								},
								"kind": {
									"type": "string",
									"enum": [
										"FORM",
										"PDF_ACROFORM",
										"PDF_PLACED",
										"INLINE"
									],
									"description": "Where the value lives: a FORM subfield, a form field that is part of the uploaded PDF, or a box placed on the PDF."
								},
								"fieldId": {
									"type": "string",
									"description": "The ID of the document field that holds this value. For an AcroForm field that spans several page fields, the first of them."
								},
								"type": {
									"type": "string",
									"description": "The input type: a FORM subfield type such as `INPUT`, `DATEPICKER`, or `CHECKBOX`, an AcroForm field type such as `TEXT` or `DROPDOWN`, or a box input type such as `DATE`."
								},
								"required": {
									"type": "boolean"
								},
								"options": {
									"description": "The allowed values. A value outside this list is rejected. Null when any value is allowed.",
									"type": [
										"array",
										"null"
									],
									"items": {
										"type": "string"
									}
								},
								"value": {
									"anyOf": [
										{
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "boolean"
												},
												{
													"type": "array",
													"items": {
														"type": "string"
													}
												}
											]
										},
										{
											"type": "null"
										}
									],
									"description": "The current value, or `null` if the value is empty. A FORM `CHECKBOX` holds a list of the selected options, and a PDF checkbox holds a boolean."
								},
								"filledBy": {
									"type": "string",
									"enum": [
										"SENDER",
										"SIGNER"
									],
									"description": "If `SENDER`, you can write the value. If `SIGNER`, the party fills in the value when signing, and the value is read-only."
								},
								"partyId": {
									"description": "The ID of the party that fills in the value when `filledBy` is `SIGNER`.",
									"type": [
										"string",
										"null"
									]
								}
							},
							"required": [
								"key",
								"label",
								"kind",
								"fieldId",
								"type",
								"required",
								"options",
								"value",
								"filledBy",
								"partyId"
							]
						},
						"description": "Every field value on the document after the event, as `GET /api/v1/documents/{id}/field-values` lists them."
					}
				},
				"required": [
					"object",
					"fieldValues"
				]
			},
			"WebhookPartySignedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"party": {
						"description": "The party the event is about, as `GET /api/v1/documents/{id}/parties` lists it.",
						"$ref": "#/components/schemas/WebhookParty"
					},
					"fieldValues": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"key": {
									"type": "string",
									"description": "The key you send to fill in this value. For a FORM subfield or a placed box, this is the key set in the editor, or the element ID when no key is set. For an AcroForm field, this is the field name in the PDF."
								},
								"label": {
									"type": "string",
									"description": "The label shown to the sender or party."
								},
								"kind": {
									"type": "string",
									"enum": [
										"FORM",
										"PDF_ACROFORM",
										"PDF_PLACED",
										"INLINE"
									],
									"description": "Where the value lives: a FORM subfield, a form field that is part of the uploaded PDF, or a box placed on the PDF."
								},
								"fieldId": {
									"type": "string",
									"description": "The ID of the document field that holds this value. For an AcroForm field that spans several page fields, the first of them."
								},
								"type": {
									"type": "string",
									"description": "The input type: a FORM subfield type such as `INPUT`, `DATEPICKER`, or `CHECKBOX`, an AcroForm field type such as `TEXT` or `DROPDOWN`, or a box input type such as `DATE`."
								},
								"required": {
									"type": "boolean"
								},
								"options": {
									"description": "The allowed values. A value outside this list is rejected. Null when any value is allowed.",
									"type": [
										"array",
										"null"
									],
									"items": {
										"type": "string"
									}
								},
								"value": {
									"anyOf": [
										{
											"anyOf": [
												{
													"type": "string"
												},
												{
													"type": "boolean"
												},
												{
													"type": "array",
													"items": {
														"type": "string"
													}
												}
											]
										},
										{
											"type": "null"
										}
									],
									"description": "The current value, or `null` if the value is empty. A FORM `CHECKBOX` holds a list of the selected options, and a PDF checkbox holds a boolean."
								},
								"filledBy": {
									"type": "string",
									"enum": [
										"SENDER",
										"SIGNER"
									],
									"description": "If `SENDER`, you can write the value. If `SIGNER`, the party fills in the value when signing, and the value is read-only."
								},
								"partyId": {
									"description": "The ID of the party that fills in the value when `filledBy` is `SIGNER`.",
									"type": [
										"string",
										"null"
									]
								}
							},
							"required": [
								"key",
								"label",
								"kind",
								"fieldId",
								"type",
								"required",
								"options",
								"value",
								"filledBy",
								"partyId"
							]
						},
						"description": "Every field value on the document after the event, as `GET /api/v1/documents/{id}/field-values` lists them."
					}
				},
				"required": [
					"object",
					"party",
					"fieldValues"
				]
			},
			"WebhookPartyAuthFailedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"party": {
						"description": "The party the event is about, as `GET /api/v1/documents/{id}/parties` lists it.",
						"$ref": "#/components/schemas/WebhookParty"
					},
					"method": {
						"type": "string",
						"description": "The verification method: `SMS_OTP`, `EMAIL_OTP`, `PIN`, or an eID scheme such as `SE_BANKID`."
					},
					"hintCode": {
						"type": "string",
						"description": "Why the verification failed, as reported by the method, such as `invalid_code` or `too_many_attempts`."
					}
				},
				"required": [
					"object",
					"party",
					"method",
					"hintCode"
				]
			},
			"WebhookPartyVerifiedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"party": {
						"description": "The party the event is about, as `GET /api/v1/documents/{id}/parties` lists it.",
						"$ref": "#/components/schemas/WebhookParty"
					},
					"method": {
						"type": "string",
						"description": "The verification method: `SMS_OTP`, `EMAIL_OTP`, `PIN`, `ACCOUNT` for a party who signed in to their sajn account, or an eID scheme such as `SE_BANKID`."
					},
					"purpose": {
						"type": "string",
						"enum": [
							"ACCESS",
							"SIGN"
						],
						"description": "`ACCESS` for the verification that opens the document, `SIGN` for the one before signing."
					}
				},
				"required": [
					"object",
					"party",
					"method",
					"purpose"
				]
			},
			"WebhookPartyUpdatedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"party": {
						"description": "The party the event is about, as `GET /api/v1/documents/{id}/parties` lists it.",
						"$ref": "#/components/schemas/WebhookParty"
					},
					"previousAttributes": {
						"type": "object",
						"properties": {
							"name": {
								"type": "string"
							},
							"email": {
								"type": [
									"string",
									"null"
								]
							},
							"phone": {
								"type": [
									"string",
									"null"
								]
							}
						},
						"description": "The values the changed fields of the party had before the update. Only the changed fields are present."
					}
				},
				"required": [
					"object",
					"party",
					"previousAttributes"
				]
			},
			"WebhookPartyDelegatedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"party": {
						"description": "The party the event is about, as `GET /api/v1/documents/{id}/parties` lists it.",
						"$ref": "#/components/schemas/WebhookParty"
					},
					"delegation": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"description": "Delegation ID."
							},
							"delegate": {
								"type": "object",
								"properties": {
									"name": {
										"type": "string"
									},
									"email": {
										"type": [
											"string",
											"null"
										]
									},
									"phone": {
										"type": [
											"string",
											"null"
										]
									}
								},
								"required": [
									"name",
									"email",
									"phone"
								],
								"description": "The person the party delegated to."
							},
							"reason": {
								"description": "The reason the party gave.",
								"type": [
									"string",
									"null"
								]
							},
							"delegatedAt": {
								"type": "string",
								"format": "date-time",
								"description": "When the party delegated."
							}
						},
						"required": [
							"id",
							"delegate",
							"reason",
							"delegatedAt"
						]
					}
				},
				"required": [
					"object",
					"party",
					"delegation"
				]
			},
			"WebhookPartyRemindedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The document, as `GET /api/v1/documents/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookDocument"
					},
					"party": {
						"description": "The party the event is about, as `GET /api/v1/documents/{id}/parties` lists it.",
						"$ref": "#/components/schemas/WebhookParty"
					},
					"trigger": {
						"type": "string",
						"enum": [
							"AUTOMATIC",
							"MANUAL"
						],
						"description": "`AUTOMATIC` for a scheduled reminder, `MANUAL` for one someone sent from the app or the API."
					}
				},
				"required": [
					"object",
					"party",
					"trigger"
				]
			},
			"WebhookIdentityCheckData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The identity check, as `GET /api/v1/identity-checks` lists it.",
						"$ref": "#/components/schemas/WebhookIdentityCheck"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookIdentityCheckFailedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The identity check, as `GET /api/v1/identity-checks` lists it.",
						"$ref": "#/components/schemas/WebhookIdentityCheck"
					},
					"failureReason": {
						"description": "Why the verification failed, as reported by the eID provider, such as `expiredTransaction`.",
						"type": [
							"string",
							"null"
						]
					}
				},
				"required": [
					"object",
					"failureReason"
				]
			},
			"WebhookContactData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookContact"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookCompanyData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookCompany"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookTemplateData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookTemplate"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookTemplateUpdatedData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookTemplate"
					},
					"previousAttributes": {
						"type": "object",
						"additionalProperties": {},
						"description": "The values the changed fields of `object` had before the event. Empty when only settings outside `object` changed, such as the template's style."
					}
				},
				"required": [
					"object",
					"previousAttributes"
				]
			},
			"WebhookFormSubmissionData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookFormSubmission"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookWorkspaceData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookWorkspace"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookMemberAddedData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookMember"
					},
					"via": {
						"type": "string",
						"enum": [
							"INVITE",
							"ADMIN",
							"SELF"
						],
						"description": "`INVITE` when the user accepted an invitation, `ADMIN` when an administrator added them, and `SELF` when they joined on their own."
					}
				},
				"required": [
					"object",
					"via"
				]
			},
			"WebhookUser": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "User ID"
					},
					"email": {
						"type": "string"
					},
					"name": {
						"description": "Full name. Null when the user has no name.",
						"type": [
							"string",
							"null"
						]
					}
				},
				"required": [
					"id",
					"email",
					"name"
				],
				"description": "A sajn user"
			},
			"WebhookMemberInvite": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Invitation ID"
					},
					"email": {
						"type": "string"
					},
					"role": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"required": [
							"id",
							"name"
						],
						"description": "The workspace role the invitee gets on accepting"
					},
					"status": {
						"type": "string",
						"enum": [
							"DRAFT",
							"PENDING",
							"ACCEPTED",
							"DECLINED"
						],
						"description": "`PENDING` until the invitee accepts, then `ACCEPTED`"
					},
					"invitedBy": {
						"description": "The member who sent the invitation",
						"$ref": "#/components/schemas/WebhookUser"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"expiresAt": {
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"email",
					"role",
					"status",
					"invitedBy",
					"createdAt",
					"expiresAt"
				],
				"description": "An invitation to join the workspace"
			},
			"WebhookMemberInviteData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookMemberInvite"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookApprovalRequest": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Approval request ID"
					},
					"documentId": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"DRAFT",
							"PENDING",
							"APPROVED",
							"REJECTED",
							"CANCELLED"
						],
						"description": "`DRAFT` while the document is a draft and the request isn't submitted, such as approvers a template added or a request whose document was withdrawn; `PENDING` while it waits for approvers; `APPROVED` once every stage approves; `REJECTED` after any approver rejects; `CANCELLED` only in the response to the cancel request and in the `approval_request.cancelled` event, because a cancelled request is deleted."
					},
					"autoSend": {
						"type": "boolean",
						"description": "If true, sajn sends the document for signing when the request is approved. If false, the document waits for you to send it."
					},
					"customMessage": {
						"description": "The message included in the signing invitation when the document is sent",
						"type": [
							"string",
							"null"
						]
					},
					"requestedBy": {
						"description": "The user who submitted the request",
						"$ref": "#/components/schemas/WebhookUser"
					},
					"approvers": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"user": {
									"description": "The approver",
									"$ref": "#/components/schemas/WebhookUser"
								},
								"stage": {
									"type": "integer",
									"minimum": -9007199254740991,
									"maximum": 9007199254740991,
									"description": "Stages run in ascending order. Approvers in the same stage approve in parallel."
								},
								"orGroup": {
									"description": "Approvers in the same stage with the same `orGroup` need only one approval between them. Null when this approver's approval is required.",
									"type": [
										"string",
										"null"
									]
								},
								"status": {
									"type": "string",
									"enum": [
										"PENDING",
										"APPROVED",
										"REJECTED"
									],
									"description": "This approver's decision"
								},
								"comment": {
									"description": "The approver's comment",
									"type": [
										"string",
										"null"
									]
								},
								"resolvedAt": {
									"description": "When the approver decided",
									"type": [
										"string",
										"null"
									],
									"format": "date-time"
								}
							},
							"required": [
								"user",
								"stage",
								"orGroup",
								"status",
								"comment",
								"resolvedAt"
							]
						},
						"description": "The approvers, ordered by stage"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"documentId",
					"status",
					"autoSend",
					"customMessage",
					"requestedBy",
					"approvers",
					"createdAt",
					"updatedAt"
				],
				"description": "An internal approval request for a document"
			},
			"WebhookApprovalRequestData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookApprovalRequest"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookLoginCompletedData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookLoginSession"
					},
					"clientId": {
						"type": "string",
						"description": "ID of the sajn Login client that started the login."
					},
					"mode": {
						"type": "string",
						"enum": [
							"OIDC",
							"SESSION"
						],
						"description": "`OIDC` for an OpenID Connect login, `SESSION` for a Session API login."
					}
				},
				"required": [
					"object",
					"clientId",
					"mode"
				]
			},
			"WebhookLoginFailedData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookLoginSession"
					},
					"clientId": {
						"type": "string",
						"description": "ID of the sajn Login client that started the login."
					},
					"mode": {
						"type": "string",
						"enum": [
							"OIDC",
							"SESSION"
						],
						"description": "`OIDC` for an OpenID Connect login, `SESSION` for a Session API login."
					},
					"failureReason": {
						"type": "string",
						"description": "The terminal failure reported by the eID provider, such as `expiredTransaction` or `certificateErr`."
					}
				},
				"required": [
					"object",
					"clientId",
					"mode",
					"failureReason"
				]
			},
			"WebhookSecurityDocumentDownloadedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"ipAddress": {
								"type": [
									"string",
									"null"
								]
							},
							"userAgent": {
								"type": [
									"string",
									"null"
								]
							},
							"documentId": {
								"type": "string"
							},
							"documentName": {
								"type": "string"
							},
							"fileType": {
								"type": "string",
								"enum": [
									"ORIGINAL",
									"SIGNED",
									"JOURNAL",
									"EVIDENCE"
								]
							},
							"user": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The user who acted, or the owner of the API key or OAuth connection that did. Null when sajn itself acted."
							}
						},
						"required": [
							"ipAddress",
							"userAgent",
							"documentId",
							"documentName",
							"fileType",
							"user"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookSecurityDocumentsExportedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"ipAddress": {
								"type": [
									"string",
									"null"
								]
							},
							"userAgent": {
								"type": [
									"string",
									"null"
								]
							},
							"documentCount": {
								"type": "number"
							},
							"fileCount": {
								"type": "number"
							},
							"scope": {
								"type": "string",
								"enum": [
									"SELECTION",
									"FOLDER"
								]
							},
							"folderId": {
								"type": [
									"string",
									"null"
								]
							},
							"folderName": {
								"type": [
									"string",
									"null"
								]
							},
							"user": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The user who acted, or the owner of the API key or OAuth connection that did. Null when sajn itself acted."
							}
						},
						"required": [
							"ipAddress",
							"userAgent",
							"documentCount",
							"fileCount",
							"scope",
							"folderId",
							"folderName",
							"user"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookSecuritySignatureIdentityAccessedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"ipAddress": {
								"type": [
									"string",
									"null"
								]
							},
							"userAgent": {
								"type": [
									"string",
									"null"
								]
							},
							"documentId": {
								"type": "string"
							},
							"documentName": {
								"type": "string"
							},
							"signatureCount": {
								"type": "number"
							},
							"identityCount": {
								"type": "number"
							},
							"nationalIdDisplayMode": {
								"type": "string"
							},
							"user": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The user who acted, or the owner of the API key or OAuth connection that did. Null when sajn itself acted."
							}
						},
						"required": [
							"ipAddress",
							"userAgent",
							"documentId",
							"documentName",
							"signatureCount",
							"identityCount",
							"nationalIdDisplayMode",
							"user"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookSecurityWorkspaceMemberRemovedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"ipAddress": {
								"type": [
									"string",
									"null"
								]
							},
							"userAgent": {
								"type": [
									"string",
									"null"
								]
							},
							"reassignedDocumentCount": {
								"type": [
									"number",
									"null"
								]
							},
							"user": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The user who acted, or the owner of the API key or OAuth connection that did. Null when sajn itself acted."
							},
							"member": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The member the change applies to."
							}
						},
						"required": [
							"ipAddress",
							"userAgent",
							"reassignedDocumentCount",
							"user",
							"member"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookSecurityWorkspaceMemberRoleChangedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"ipAddress": {
								"type": [
									"string",
									"null"
								]
							},
							"userAgent": {
								"type": [
									"string",
									"null"
								]
							},
							"previousRoleId": {
								"type": [
									"string",
									"null"
								]
							},
							"roleId": {
								"type": "string"
							},
							"user": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The user who acted, or the owner of the API key or OAuth connection that did. Null when sajn itself acted."
							},
							"member": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The member the change applies to."
							}
						},
						"required": [
							"ipAddress",
							"userAgent",
							"previousRoleId",
							"roleId",
							"user",
							"member"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookSecurityWorkspaceRoleUpdatedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"ipAddress": {
								"type": [
									"string",
									"null"
								]
							},
							"userAgent": {
								"type": [
									"string",
									"null"
								]
							},
							"roleId": {
								"type": "string"
							},
							"roleName": {
								"type": "string"
							},
							"permissions": {
								"type": "array",
								"items": {
									"type": "string"
								}
							},
							"user": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The user who acted, or the owner of the API key or OAuth connection that did. Null when sajn itself acted."
							}
						},
						"required": [
							"ipAddress",
							"userAgent",
							"roleId",
							"roleName",
							"permissions",
							"user"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookSecurityWorkspaceRetentionUpdatedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"ipAddress": {
								"type": [
									"string",
									"null"
								]
							},
							"userAgent": {
								"type": [
									"string",
									"null"
								]
							},
							"workspaceName": {
								"type": "string"
							},
							"previousCompletedRetentionDays": {
								"type": [
									"number",
									"null"
								]
							},
							"previousTrashRetentionDays": {
								"type": [
									"number",
									"null"
								]
							},
							"completedRetentionDays": {
								"type": [
									"number",
									"null"
								]
							},
							"trashRetentionDays": {
								"type": [
									"number",
									"null"
								]
							},
							"user": {
								"anyOf": [
									{
										"$ref": "#/components/schemas/WebhookUser"
									},
									{
										"type": "null"
									}
								],
								"description": "The user who acted, or the owner of the API key or OAuth connection that did. Null when sajn itself acted."
							}
						},
						"required": [
							"ipAddress",
							"userAgent",
							"workspaceName",
							"previousCompletedRetentionDays",
							"previousTrashRetentionDays",
							"completedRetentionDays",
							"trashRetentionDays",
							"user"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookTestData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string",
								"description": "ID of the webhook."
							},
							"url": {
								"type": "string"
							}
						},
						"required": [
							"id",
							"url"
						],
						"description": "The webhook the test was sent to."
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookComment": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string"
					},
					"threadId": {
						"type": "string"
					},
					"parentId": {
						"description": "The ID of the message this one replies to. Null for a top-level message.",
						"type": [
							"string",
							"null"
						]
					},
					"body": {
						"type": "string",
						"description": "The message text."
					},
					"mentions": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "IDs of the users the message mentions."
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"editedAt": {
						"description": "When the message was last edited. Null if it never was.",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"deletedAt": {
						"description": "When the message was deleted. Null if it wasn't.",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"author": {
						"type": "object",
						"properties": {
							"type": {
								"type": "string",
								"enum": [
									"USER",
									"AI",
									"SIGNER"
								],
								"description": "Whether a workspace member, the AI assistant, or a party wrote the message."
							},
							"id": {
								"description": "The user or party ID. Null for the AI assistant, or when the author no longer exists.",
								"type": [
									"string",
									"null"
								]
							},
							"name": {
								"type": [
									"string",
									"null"
								]
							},
							"email": {
								"type": [
									"string",
									"null"
								]
							}
						},
						"required": [
							"type",
							"id",
							"name",
							"email"
						],
						"description": "Who wrote the message."
					}
				},
				"required": [
					"id",
					"threadId",
					"parentId",
					"body",
					"mentions",
					"createdAt",
					"editedAt",
					"deletedAt",
					"author"
				]
			},
			"WebhookDocumentCommentCreatedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The new comment: the first message of a thread, or a reply.",
						"$ref": "#/components/schemas/WebhookComment"
					},
					"thread": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"documentId": {
								"type": [
									"string",
									"null"
								]
							},
							"status": {
								"type": "string",
								"enum": [
									"OPEN",
									"RESOLVED"
								],
								"description": "Whether the thread is open or resolved."
							},
							"visibility": {
								"type": "string",
								"enum": [
									"INTERNAL",
									"SHARED"
								],
								"description": "If `SHARED`, every party on the document sees the thread. If `INTERNAL`, only the workspace does."
							},
							"excerpt": {
								"description": "The document text the thread refers to.",
								"type": [
									"string",
									"null"
								]
							},
							"createdAt": {
								"type": "string",
								"format": "date-time"
							},
							"updatedAt": {
								"type": "string",
								"format": "date-time"
							},
							"resolvedAt": {
								"description": "When the thread was resolved. Null while it's open.",
								"type": [
									"string",
									"null"
								],
								"format": "date-time"
							},
							"createdBy": {
								"description": "Who wrote it. Null when the author no longer exists.",
								"type": [
									"object",
									"null"
								],
								"properties": {
									"id": {
										"type": "string"
									},
									"name": {
										"type": [
											"string",
											"null"
										]
									},
									"email": {
										"type": [
											"string",
											"null"
										]
									}
								},
								"required": [
									"id",
									"name",
									"email"
								]
							},
							"resolvedBy": {
								"description": "Who wrote it. Null when the author no longer exists.",
								"type": [
									"object",
									"null"
								],
								"properties": {
									"id": {
										"type": "string"
									},
									"name": {
										"type": [
											"string",
											"null"
										]
									},
									"email": {
										"type": [
											"string",
											"null"
										]
									}
								},
								"required": [
									"id",
									"name",
									"email"
								]
							}
						},
						"required": [
							"id",
							"documentId",
							"status",
							"visibility",
							"excerpt",
							"createdAt",
							"updatedAt",
							"resolvedAt",
							"createdBy",
							"resolvedBy"
						],
						"description": "The thread the comment belongs to, without its messages."
					}
				},
				"required": [
					"object",
					"thread"
				]
			},
			"WebhookBundle": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"description": "The bundle name, shown as the heading of the bundle page and in the invitation.",
						"type": [
							"string",
							"null"
						]
					},
					"status": {
						"type": "string",
						"enum": [
							"DRAFT",
							"OPEN",
							"COMPLETED",
							"CANCELED"
						],
						"description": "`DRAFT` while you build it, and again after a withdraw. `OPEN` from the send until every document is resolved, then `COMPLETED`. `CANCELED` after a cancel."
					},
					"subject": {
						"description": "The subject line of the invitation email.",
						"type": [
							"string",
							"null"
						]
					},
					"message": {
						"description": "A message included in every invitation.",
						"type": [
							"string",
							"null"
						]
					},
					"expiresAt": {
						"description": "The expiry date of the bundle. Every document in it gets the same one.",
						"type": [
							"string",
							"null"
						],
						"format": "date-time"
					},
					"signingMode": {
						"type": "string",
						"enum": [
							"PARALLEL",
							"SEQUENTIAL"
						],
						"description": "How the parties sign: `PARALLEL`, all at once, or `SEQUENTIAL`, one at a time in the order of each party's `signingOrder`. The order runs across every document in the bundle."
					},
					"language": {
						"type": "string",
						"enum": [
							"sv",
							"en",
							"no",
							"da",
							"fi",
							"de",
							"is",
							"es",
							"fr",
							"it"
						],
						"description": "Language of the bundle page and the emails to the parties, an ISO 639-1 code such as `sv`."
					},
					"reminderIntervalDays": {
						"description": "Days between automatic reminders. `0` turns them off, and null uses the default of 3.",
						"type": [
							"integer",
							"null"
						],
						"minimum": -9007199254740991,
						"maximum": 9007199254740991
					},
					"signableAfterExpired": {
						"type": "boolean",
						"description": "Whether the documents can still be signed after `expiresAt`."
					},
					"internalRecipients": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "Email addresses that receive a copy of each sealed PDF once its document is completed."
					},
					"nationalIdDisplayMode": {
						"description": "How national identity numbers are displayed to signers: `FULL`, `PARTIAL`, or `NONE`. null keeps each document's own setting.",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"FULL",
							"PARTIAL",
							"NONE",
							null
						]
					},
					"openVerification": {
						"description": "Verification every party passes before the document opens: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. A party's own `openVerification` overrides it.",
						"type": [
							"string",
							"null"
						],
						"enum": [
							"PIN",
							"SMS",
							"EMAIL",
							"SE_BANKID",
							"NO_BANKID_BIOMETRIC",
							"NO_BANKID_HIGH",
							"DK_MITID",
							"DK_MITID_ERHVERV",
							"FI_FTN",
							"NL_IDIN",
							null
						]
					},
					"sendPlainTextEmailOnly": {
						"description": "Send plain text invitations only, without HTML. null inherits the workspace default.",
						"type": [
							"boolean",
							"null"
						]
					},
					"redirectUrl": {
						"description": "URL to send a party to once they have signed.",
						"type": [
							"string",
							"null"
						]
					},
					"redirectEnabled": {
						"type": "boolean",
						"description": "Whether `redirectUrl` is used."
					},
					"documentCount": {
						"type": "integer",
						"minimum": -9007199254740991,
						"maximum": 9007199254740991,
						"description": "The number of documents in `documents`."
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"documents": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"status": {
									"type": "string",
									"enum": [
										"DRAFT",
										"PENDING_APPROVAL",
										"PENDING",
										"COMPLETED",
										"EXPIRED",
										"CANCELLED",
										"REJECTED",
										"IMPORTED"
									]
								},
								"parties": {
									"type": "array",
									"items": {
										"type": "object",
										"properties": {
											"id": {
												"type": "string",
												"description": "The party ID on this document, for the document and party endpoints."
											},
											"bundlePartyId": {
												"description": "The bundle party this document party belongs to, from `parties`.",
												"type": [
													"string",
													"null"
												]
											},
											"name": {
												"type": "string"
											},
											"email": {
												"type": [
													"string",
													"null"
												],
												"format": "email",
												"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
											},
											"role": {
												"type": "string",
												"enum": [
													"SIGNER",
													"ORGANIZER",
													"REVIEWER"
												]
											},
											"signingStatus": {
												"type": "string",
												"enum": [
													"NOT_SIGNED",
													"SIGNED",
													"REJECTED"
												]
											},
											"signedAt": {
												"type": [
													"string",
													"null"
												],
												"format": "date-time"
											}
										},
										"required": [
											"id",
											"bundlePartyId",
											"name",
											"email",
											"role",
											"signingStatus",
											"signedAt"
										]
									}
								}
							},
							"required": [
								"id",
								"name",
								"status",
								"parties"
							]
						},
						"description": "The documents in the bundle, oldest first."
					},
					"parties": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"id": {
									"type": "string",
									"description": "The party ID. To get the party's signing URL, pass it to `GET /api/v1/bundles/{id}/parties/{partyId}`."
								},
								"name": {
									"type": "string"
								},
								"email": {
									"type": "string",
									"format": "email",
									"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
									"description": "The email address the party gets the invitation at. A bundle has one party per email address."
								},
								"phone": {
									"type": [
										"string",
										"null"
									]
								},
								"role": {
									"type": "string",
									"enum": [
										"SIGNER",
										"ORGANIZER",
										"REVIEWER"
									]
								},
								"signingOrder": {
									"description": "The party's step for `SEQUENTIAL` signing.",
									"type": [
										"integer",
										"null"
									],
									"minimum": -9007199254740991,
									"maximum": 9007199254740991
								},
								"delivery": {
									"type": "array",
									"items": {
										"type": "string",
										"enum": [
											"EMAIL",
											"SMS",
											"IN_APP"
										]
									},
									"description": "How the party gets the invitation: `[\"EMAIL\"]`, `[\"SMS\"]`, `[\"EMAIL\", \"SMS\"]` for both, or `[\"IN_APP\"]` to sign in person on your device. `[]` sends nothing, so you share the signing URL yourself. Each channel needs the matching contact detail."
								},
								"signatureMethod": {
									"description": "How the party signs: `DRAWING`, `SE_BANKID`, `CLICK_TO_SIGN`, or another eID.",
									"type": [
										"string",
										"null"
									],
									"enum": [
										"NONE",
										"DRAWING",
										"SE_BANKID",
										"MANUAL",
										"CLICK_TO_SIGN",
										"NO_BANKID_BIOMETRIC",
										"NO_BANKID_HIGH",
										"NO_QES",
										"DK_MITID",
										"DK_MITID_ERHVERV",
										"FI_FTN",
										"NL_IDIN",
										"ZEALID_QES",
										null
									]
								},
								"signVerification": {
									"description": "Verification the party passes before signing: `PIN`, `SMS`, `EMAIL`, or an eID such as `SE_BANKID`. null means none. Call `GET /api/v1/helpers/two-step-verifications` for the methods your account can use.",
									"type": [
										"string",
										"null"
									],
									"enum": [
										"PIN",
										"SMS",
										"EMAIL",
										"SE_BANKID",
										"NO_BANKID_BIOMETRIC",
										"NO_BANKID_HIGH",
										"DK_MITID",
										"DK_MITID_ERHVERV",
										"FI_FTN",
										"NL_IDIN",
										null
									]
								},
								"openVerification": {
									"description": "Verification this party passes before the documents open, in place of the bundle's `openVerification`. null uses the bundle's.",
									"type": [
										"string",
										"null"
									],
									"enum": [
										"PIN",
										"SMS",
										"EMAIL",
										"SE_BANKID",
										"NO_BANKID_BIOMETRIC",
										"NO_BANKID_HIGH",
										"DK_MITID",
										"DK_MITID_ERHVERV",
										"FI_FTN",
										"NL_IDIN",
										null
									]
								},
								"status": {
									"description": "`SIGNED` when the party has signed every one of their documents, `REJECTED` when they rejected any of them, otherwise `PENDING`. null for a party that doesn't sign, an `ORGANIZER` or `REVIEWER`.",
									"type": [
										"string",
										"null"
									],
									"enum": [
										"PENDING",
										"SIGNED",
										"REJECTED",
										null
									]
								},
								"documentIds": {
									"type": "array",
									"items": {
										"type": "string"
									},
									"description": "The documents in the bundle the party is on."
								}
							},
							"required": [
								"id",
								"name",
								"email",
								"phone",
								"role",
								"signingOrder",
								"delivery",
								"signatureMethod",
								"signVerification",
								"openVerification",
								"status",
								"documentIds"
							]
						},
						"description": "The bundle's parties, in signing order."
					}
				},
				"required": [
					"id",
					"name",
					"status",
					"subject",
					"message",
					"expiresAt",
					"signingMode",
					"language",
					"reminderIntervalDays",
					"signableAfterExpired",
					"internalRecipients",
					"nationalIdDisplayMode",
					"openVerification",
					"sendPlainTextEmailOnly",
					"redirectUrl",
					"redirectEnabled",
					"documentCount",
					"createdAt",
					"updatedAt",
					"documents",
					"parties"
				]
			},
			"WebhookBundleData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The bundle, as `GET /api/v1/bundles/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookBundle"
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookBundlePartySignedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The bundle, as `GET /api/v1/bundles/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookBundle"
					},
					"party": {
						"type": "object",
						"properties": {
							"email": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"required": [
							"email",
							"name"
						],
						"description": "The person who has nothing left to sign in the bundle."
					},
					"documentIds": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "IDs of the documents the person signed. A document they rejected isn't included."
					}
				},
				"required": [
					"object",
					"party",
					"documentIds"
				]
			},
			"WebhookBundleCompletedData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The bundle, as `GET /api/v1/bundles/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookBundle"
					},
					"documentIds": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "IDs of every document in the bundle."
					}
				},
				"required": [
					"object",
					"documentIds"
				]
			},
			"WebhookBundleCanceledData": {
				"type": "object",
				"properties": {
					"object": {
						"description": "The bundle, as `GET /api/v1/bundles/{id}` returns it.",
						"$ref": "#/components/schemas/WebhookBundle"
					},
					"documentIds": {
						"type": "array",
						"items": {
							"type": "string"
						},
						"description": "IDs of the documents the cancel withdrew. They are back in `DRAFT` and no longer in the bundle, so `object.documents` leaves them out."
					}
				},
				"required": [
					"object",
					"documentIds"
				]
			},
			"WebhookArchiveImportCompletedData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"name": {
								"type": "string"
							},
							"source": {
								"type": "string",
								"enum": [
									"ONEFLOW",
									"SAJN",
									"GENERIC"
								],
								"description": "The system the archive was exported from. `GENERIC` for a folder of PDFs."
							},
							"totalItems": {
								"type": "number",
								"description": "Documents the import planned to create."
							},
							"importedCount": {
								"type": "number",
								"description": "Documents created so far, across every run."
							},
							"skippedCount": {
								"type": "number"
							},
							"failedCount": {
								"type": "number"
							},
							"runAttempt": {
								"type": "number",
								"description": "1 for the first run, then one more for each retry of failed documents."
							},
							"startedAt": {
								"type": [
									"string",
									"null"
								],
								"format": "date-time"
							},
							"completedAt": {
								"type": "string",
								"format": "date-time"
							}
						},
						"required": [
							"id",
							"name",
							"source",
							"totalItems",
							"importedCount",
							"skippedCount",
							"failedCount",
							"runAttempt",
							"startedAt",
							"completedAt"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookArchiveImportUndoneData": {
				"type": "object",
				"properties": {
					"object": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"name": {
								"type": "string"
							},
							"source": {
								"type": "string",
								"enum": [
									"ONEFLOW",
									"SAJN",
									"GENERIC"
								],
								"description": "The system the archive was exported from. `GENERIC` for a folder of PDFs."
							},
							"trashedCount": {
								"type": "number",
								"description": "Imported documents moved to the trash."
							},
							"keptCount": {
								"type": "number",
								"description": "Imported documents kept because they were sent or signed after the import."
							},
							"undoneAt": {
								"type": "string",
								"format": "date-time"
							}
						},
						"required": [
							"id",
							"name",
							"source",
							"trashedCount",
							"keptCount",
							"undoneAt"
						]
					}
				},
				"required": [
					"object"
				]
			},
			"WebhookUsageLimit": {
				"type": "object",
				"properties": {
					"organizationId": {
						"type": "string"
					},
					"resource": {
						"type": "string",
						"enum": [
							"DOCUMENTS",
							"SIGNATURES"
						],
						"description": "`DOCUMENTS` for the monthly document quota, `SIGNATURES` for an eID signature quota."
					},
					"scheme": {
						"description": "The eID scheme whose signature quota was reached, such as `SE_BANKID`. Null for `DOCUMENTS`.",
						"type": [
							"string",
							"null"
						]
					},
					"quota": {
						"type": "integer",
						"minimum": -9007199254740991,
						"maximum": 9007199254740991,
						"description": "The quota for the period."
					},
					"used": {
						"type": "integer",
						"minimum": -9007199254740991,
						"maximum": 9007199254740991,
						"description": "What the organization used in the period when it reached the quota."
					},
					"periodStart": {
						"description": "Start of the period the quota covers.",
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"organizationId",
					"resource",
					"scheme",
					"quota",
					"used",
					"periodStart"
				],
				"description": "A quota the organization reached"
			},
			"WebhookUsageLimitReachedData": {
				"type": "object",
				"properties": {
					"object": {
						"$ref": "#/components/schemas/WebhookUsageLimit"
					}
				},
				"required": [
					"object"
				]
			}
		}
	},
	"tags": [
		{
			"name": "Health",
			"description": "API health and version information"
		},
		{
			"name": "Documents",
			"description": "Create, manage, and send documents for signing"
		},
		{
			"name": "Templates",
			"description": "Create and manage templates that can be used to spin up new documents"
		},
		{
			"name": "Parties",
			"description": "Manage document parties (signers and other participants)"
		},
		{
			"name": "Bundles",
			"description": "Send several documents as one invitation, so each person signs all of theirs in one action"
		},
		{
			"name": "Contacts",
			"description": "Manage contacts and contact information"
		},
		{
			"name": "Companies",
			"description": "Manage companies and organizations"
		},
		{
			"name": "Fields",
			"description": "Manage document fields and sections"
		},
		{
			"name": "Tags",
			"description": "Organize documents with tags"
		},
		{
			"name": "Custom Fields",
			"description": "Define and manage custom fields for documents"
		},
		{
			"name": "sajn ID",
			"description": "Identity verification with Swedish BankID"
		},
		{
			"name": "Files",
			"description": "Upload and manage files. `POST /api/v1/files` returns a presigned URL that you upload the bytes to."
		},
		{
			"name": "Folders",
			"description": "Organize documents and templates into hierarchical folders"
		},
		{
			"name": "Comments",
			"description": "Thread-based discussion on documents"
		},
		{
			"name": "Reminders",
			"description": "Send and inspect signing reminders on a document"
		},
		{
			"name": "Helpers",
			"description": "Reference data: languages, countries, currencies, timezones"
		},
		{
			"name": "Organization",
			"description": "Authenticated organization metadata and branding"
		},
		{
			"name": "Webhook Deliveries",
			"description": "Inspect and retry past webhook deliveries"
		},
		{
			"name": "Delegations",
			"description": "Read-only access to signer delegation events on a document"
		},
		{
			"name": "Blocks",
			"description": "Reusable library blocks for templates"
		}
	],
	"webhooks": {
		"document.created": {
			"post": {
				"summary": "document.created",
				"operationId": "webhook_document_created",
				"description": "Fires when a document is created, including when a document is duplicated or created from an attachment emailed to the workspace inbox; `data.source` says which. The document is usually still a `DRAFT`. Use it to link the document to a record in your system, for example through `externalId`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentCreatedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": null,
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "DRAFT",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"source": null
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.sent": {
			"post": {
				"summary": "document.sent",
				"operationId": "webhook_document_sent",
				"description": "Fires when a document is sent to its parties for signing. It fires again each time the document is sent again, for example after it was withdrawn and edited.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.sent"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.sent",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.fully_signed": {
			"post": {
				"summary": "document.fully_signed",
				"operationId": "webhook_document_fully_signed",
				"description": "Fires when every party has signed, before sajn seals the document. The sealed PDF isn't ready yet, so to download the signed document, wait for `document.completed`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.fully_signed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.fully_signed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-29T07:41:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.completed": {
			"post": {
				"summary": "document.completed",
				"operationId": "webhook_document_completed",
				"description": "Fires when the document is sealed and complete. This is the event to act on for a finished agreement, such as downloading the signed document or updating the deal in your CRM. `fieldValues` holds every value the parties and the sender filled in.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.completed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentCompletedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.completed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "COMPLETED",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-29T07:42:00.000Z",
										"completedAt": "2026-09-29T07:42:00.000Z",
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"fieldValues": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"kind": "FORM",
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"type": "DATEPICKER",
											"required": true,
											"options": null,
											"value": "2026-11-01",
											"filledBy": "SENDER",
											"partyId": null
										}
									]
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.rejected": {
			"post": {
				"summary": "document.rejected",
				"operationId": "webhook_document_rejected",
				"description": "Fires when a party rejects the document, which ends signing for every party. `document.party.rejected` reports the same rejection with the party who rejected.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.rejected"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.rejected",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "REJECTED",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "REJECTED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.expired": {
			"post": {
				"summary": "document.expired",
				"operationId": "webhook_document_expired",
				"description": "Fires when a pending document passes its expiration date before every party has signed. To reopen signing, set a new expiration date, which fires `document.expiration_extended`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.expired"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.expired",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "EXPIRED",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-10-28T22:00:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.withdrawn": {
			"post": {
				"summary": "document.withdrawn",
				"operationId": "webhook_document_withdrawn",
				"description": "Fires when the sender withdraws a sent document. The document returns to `DRAFT`, and its parties can no longer sign it.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.withdrawn"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.withdrawn",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "DRAFT",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.updated": {
			"post": {
				"summary": "document.updated",
				"operationId": "webhook_document_updated",
				"description": "Fires when the content of a sent document is updated in place, before anyone has signed. sajn doesn't send the parties a new invitation. If you store the document's content, read it again.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.updated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.updated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.deleted": {
			"post": {
				"summary": "document.deleted",
				"operationId": "webhook_document_deleted",
				"description": "Fires when a document moves to the trash, whether someone deleted it or the workspace's retention policy did. Remove or flag the document in your system.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.deleted"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.deleted",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": null,
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "DRAFT",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.restored": {
			"post": {
				"summary": "document.restored",
				"operationId": "webhook_document_restored",
				"description": "Fires when a document is restored from the trash.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.restored"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.restored",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": null,
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "DRAFT",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.archived": {
			"post": {
				"summary": "document.archived",
				"operationId": "webhook_document_archived",
				"description": "Fires when a document is archived.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.archived"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.archived",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "COMPLETED",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-29T07:41:00.000Z",
										"completedAt": "2026-09-29T07:42:00.000Z",
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.unarchived": {
			"post": {
				"summary": "document.unarchived",
				"operationId": "webhook_document_unarchived",
				"description": "Fires when a document is taken out of the archive.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.unarchived"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.unarchived",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "COMPLETED",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-29T07:41:00.000Z",
										"completedAt": "2026-09-29T07:42:00.000Z",
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.expiration_extended": {
			"post": {
				"summary": "document.expiration_extended",
				"operationId": "webhook_document_expiration_extended",
				"description": "Fires when someone sets a new expiration date on a pending or expired document. An expired document returns to `PENDING`, so its parties can sign again. The new date can also be earlier than the previous one; compare `object.expiresAt` with `previousAttributes.expiresAt`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.expiration_extended"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentExpirationExtendedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.expiration_extended",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-11-11T23:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"previousAttributes": {
										"expiresAt": "2026-10-28T22:00:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.expiring_soon": {
			"post": {
				"summary": "document.expiring_soon",
				"operationId": "webhook_document_expiring_soon",
				"description": "Fires about a day before a pending document expires, while at least one party still hasn't signed. To give the parties more time, set a new expiration date.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.expiring_soon"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.expiring_soon",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.sent": {
			"post": {
				"summary": "document.party.sent",
				"operationId": "webhook_document_party_sent",
				"description": "Fires when sajn sends a party the signing invitation, by email or SMS.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.sent"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.sent",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.delivery_failed": {
			"post": {
				"summary": "document.party.delivery_failed",
				"operationId": "webhook_document_party_delivery_failed",
				"description": "Fires when the invitation can't reach a party: the SMS fails to send, or the email bounces. After a bounce, sajn stops the party's scheduled reminders. Correct the party's email address or phone number, and then send the invitation again.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.delivery_failed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.delivery_failed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.opened": {
			"post": {
				"summary": "document.party.opened",
				"operationId": "webhook_document_party_opened",
				"description": "Fires when a party opens the document from the signing link. It can fire again when the party opens the document again.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.opened"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.opened",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.read": {
			"post": {
				"summary": "document.party.read",
				"operationId": "webhook_document_party_read",
				"description": "Fires once per party, when the party has read the whole document in the signing view: scrolled to its end, or confirmed reading it where the document requires that. `document.party.opened` fires before it, each time the party opens the link.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.read"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.read",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.signed": {
			"post": {
				"summary": "document.party.signed",
				"operationId": "webhook_document_party_signed",
				"description": "Fires when a party signs. When the last party signs, `document.fully_signed` follows. `fieldValues` holds every value filled in so far.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.signed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartySignedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.signed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-29T07:41:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": "2026-09-29T07:41:00.000Z",
												"readStatus": "READ",
												"signingStatus": "SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": true,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": "2026-09-29T07:41:00.000Z",
										"readStatus": "READ",
										"signingStatus": "SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": true,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									},
									"fieldValues": [
										{
											"key": "startdatum",
											"label": "Startdatum",
											"kind": "FORM",
											"fieldId": "cm4k2x9p10009abcd1234efgh",
											"type": "DATEPICKER",
											"required": true,
											"options": null,
											"value": "2026-11-01",
											"filledBy": "SENDER",
											"partyId": null
										}
									]
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.rejected": {
			"post": {
				"summary": "document.party.rejected",
				"operationId": "webhook_document_party_rejected",
				"description": "Fires when a party rejects the document. `document.rejected` reports the same rejection for the document.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.rejected"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.rejected",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "REJECTED",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "REJECTED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "REJECTED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.delegated": {
			"post": {
				"summary": "document.party.delegated",
				"operationId": "webhook_document_party_delegated",
				"description": "Fires when a party delegates signing to another person. `data.party` is the party who delegated, and `data.delegation.delegate` is the person who receives the invitation instead.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.delegated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyDelegatedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.delegated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": null,
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": null,
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "READ",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10005abcd1234efgh",
										"name": "Alex Berg",
										"email": "alex@example.com",
										"externalId": null,
										"signingOrder": 1
									},
									"delegation": {
										"id": "cm4k2x9p10031abcd1234efgh",
										"delegate": {
											"name": "Quinn Ek",
											"email": "quinn@example.com",
											"phone": null
										},
										"reason": "Quinn har firmateckningsrätt för det här avtalet.",
										"delegatedAt": "2026-09-28T14:03:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.auth_failed": {
			"post": {
				"summary": "document.party.auth_failed",
				"operationId": "webhook_document_party_auth_failed",
				"description": "Fires when a party fails the verification that protects the document, such as a wrong SMS code or PIN, or an eID authentication that fails. Use it to find parties who are stuck, or repeated failures that can indicate misuse.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.auth_failed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyAuthFailedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.auth_failed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									},
									"method": "SMS_OTP",
									"hintCode": "invalid_code"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.verified": {
			"post": {
				"summary": "document.party.verified",
				"operationId": "webhook_document_party_verified",
				"description": "Fires when a party passes the verification that protects the document, such as an SMS code, a PIN, a sign-in to the party's sajn account, or an eID authentication. `data.purpose` is `ACCESS` for the verification that opens the document and `SIGN` for the one before signing. `document.party.auth_failed` reports a failed attempt.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.verified"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyVerifiedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.verified",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									},
									"method": "SE_BANKID",
									"purpose": "ACCESS"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.updated": {
			"post": {
				"summary": "document.party.updated",
				"operationId": "webhook_document_party_updated",
				"description": "Fires when someone corrects the name, email address, or phone number of a party who hasn't signed a sent document. `data.previousAttributes` holds the old values of the fields that changed. A party whose address changed gets a new signing link.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.updated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyUpdatedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.updated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai.lindqvist@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									},
									"previousAttributes": {
										"email": "kai@example.com"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.added": {
			"post": {
				"summary": "document.party.added",
				"operationId": "webhook_document_party_added",
				"description": "Fires when a party is added to a document that's already sent.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.added"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.added",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.removed": {
			"post": {
				"summary": "document.party.removed",
				"operationId": "webhook_document_party_removed",
				"description": "Fires when a party is removed from a document that's already sent. `object.parties` no longer lists the removed party.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.removed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.removed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.party.reminded": {
			"post": {
				"summary": "document.party.reminded",
				"operationId": "webhook_document_party_reminded",
				"description": "Fires when a party gets a reminder to sign: a scheduled one, with `data.trigger` set to `AUTOMATIC`, or one someone sent from the app or the API, with `MANUAL`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Parties",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.party.reminded"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookPartyRemindedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.party.reminded",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10003abcd1234efgh",
										"externalId": "hr-offer-2026-114",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"name": "Anställningsavtal – Kai Lindqvist",
										"status": "PENDING",
										"documentMeta": {
											"subject": "Ditt anställningsavtal från Exempelbolaget AB",
											"message": "Hej Kai! Här är ditt anställningsavtal. Signera det med BankID senast den 28 oktober.",
											"signingMode": "PARALLEL",
											"forceReadFullDocument": true,
											"showChatToSigners": false,
											"language": "sv",
											"value": null,
											"redirectUrl": null,
											"redirectEnabled": false,
											"internalRecipients": [
												"hr@example.com"
											],
											"signableAfterExpired": false,
											"sendPlainTextEmailOnly": null,
											"reminderIntervalDays": 3,
											"allowDelegation": false,
											"openVerification": null,
											"aiChatEnabled": null,
											"nationalIdDisplayMode": null,
											"sameDeviceSigning": false,
											"documentCategoryId": "cm4k2x9p10017abcd1234efgh"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"completedAt": null,
										"deletedAt": null,
										"templateId": "cm4k2x9p10008abcd1234efgh",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"responsibleUserId": "cm4k2x9p10002abcd1234efgh",
										"parties": [
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": null,
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": null,
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "READ",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10005abcd1234efgh",
												"name": "Alex Berg",
												"email": "alex@example.com",
												"externalId": null,
												"signingOrder": 1
											},
											{
												"documentId": "cm4k2x9p10003abcd1234efgh",
												"phone": "+46701740605",
												"type": "INDIVIDUAL",
												"company": null,
												"contactId": "cm4k2x9p10006abcd1234efgh",
												"nationalId": null,
												"country": "SE",
												"role": "SIGNER",
												"signedAt": null,
												"readStatus": "NOT_OPENED",
												"signingStatus": "NOT_SIGNED",
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"sendStatus": "DELIVERED",
												"identityVerified": false,
												"identityMismatch": false,
												"createdAt": "2026-09-28T09:12:00.000Z",
												"id": "cm4k2x9p10004abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"externalId": "hr-candidate-4821",
												"signingOrder": 2
											}
										],
										"tags": [],
										"customFields": [],
										"content": null,
										"productTables": [],
										"approvalRequestId": null,
										"bundleId": null
									},
									"party": {
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"phone": "+46701740605",
										"type": "INDIVIDUAL",
										"company": null,
										"contactId": "cm4k2x9p10006abcd1234efgh",
										"nationalId": null,
										"country": "SE",
										"role": "SIGNER",
										"signedAt": null,
										"readStatus": "NOT_OPENED",
										"signingStatus": "NOT_SIGNED",
										"delivery": [
											"EMAIL"
										],
										"signatureMethod": "SE_BANKID",
										"signVerification": null,
										"openVerification": null,
										"sendStatus": "DELIVERED",
										"identityVerified": false,
										"identityMismatch": false,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"id": "cm4k2x9p10004abcd1234efgh",
										"name": "Kai Lindqvist",
										"email": "kai@example.com",
										"externalId": "hr-candidate-4821",
										"signingOrder": 2
									},
									"trigger": "AUTOMATIC"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"document.comment.created": {
			"post": {
				"summary": "document.comment.created",
				"operationId": "webhook_document_comment_created",
				"description": "Fires when a workspace member or a party comments on a document, in a new thread or as a reply. `data.object` is the comment and `data.thread` the thread it belongs to. Internal threads, which only the workspace sees, fire it too; `data.thread.visibility` tells them apart.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Documents",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"document.comment.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookDocumentCommentCreatedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "document.comment.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10019abcd1234efgh",
										"threadId": "cm4k2x9p10018abcd1234efgh",
										"parentId": null,
										"body": "Kan vi ändra startdatumet till den 1 december?",
										"mentions": [],
										"createdAt": "2026-09-28T14:03:00.000Z",
										"editedAt": null,
										"deletedAt": null,
										"author": {
											"type": "SIGNER",
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com"
										}
									},
									"thread": {
										"id": "cm4k2x9p10018abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"status": "OPEN",
										"visibility": "SHARED",
										"excerpt": "Anställningen börjar den 1 november 2026.",
										"createdAt": "2026-09-28T14:03:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"resolvedAt": null,
										"createdBy": {
											"id": "cm4k2x9p10004abcd1234efgh",
											"name": "Kai Lindqvist",
											"email": "kai@example.com"
										},
										"resolvedBy": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"bundle.sent": {
			"post": {
				"summary": "bundle.sent",
				"operationId": "webhook_bundle_sent",
				"description": "Fires when sajn sends a bundle: one invitation per person that covers all of their documents in it. Every document in the bundle also fires its own events, such as `document.sent`. `data.object.documents` lists only the documents that were sent; a document that failed to send stays `DRAFT` and leaves the bundle.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Bundles",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"bundle.sent"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookBundleData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "bundle.sent",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10044abcd1234efgh",
										"name": "Anställningspaket – Kai Lindqvist",
										"status": "OPEN",
										"subject": "Ditt anställningspaket från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal och sekretessavtalet. Signera båda med BankID senast den 28 oktober.",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"signingMode": "PARALLEL",
										"language": "sv",
										"reminderIntervalDays": 3,
										"signableAfterExpired": false,
										"internalRecipients": [
											"hr@example.com"
										],
										"nationalIdDisplayMode": null,
										"openVerification": null,
										"sendPlainTextEmailOnly": null,
										"redirectUrl": null,
										"redirectEnabled": false,
										"documentCount": 2,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"documents": [
											{
												"id": "cm4k2x9p10003abcd1234efgh",
												"name": "Anställningsavtal – Kai Lindqvist",
												"status": "PENDING",
												"parties": [
													{
														"id": "cm4k2x9p10004abcd1234efgh",
														"bundlePartyId": "cm4k2x9p10091abcd1234efgh",
														"name": "Kai Lindqvist",
														"email": "kai@example.com",
														"role": "SIGNER",
														"signingStatus": "NOT_SIGNED",
														"signedAt": null
													}
												]
											},
											{
												"id": "cm4k2x9p10022abcd1234efgh",
												"name": "Sekretessavtal – Kai Lindqvist",
												"status": "PENDING",
												"parties": [
													{
														"id": "cm4k2x9p10090abcd1234efgh",
														"bundlePartyId": "cm4k2x9p10091abcd1234efgh",
														"name": "Kai Lindqvist",
														"email": "kai@example.com",
														"role": "SIGNER",
														"signingStatus": "NOT_SIGNED",
														"signedAt": null
													}
												]
											}
										],
										"parties": [
											{
												"id": "cm4k2x9p10091abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"phone": "+46701740605",
												"role": "SIGNER",
												"signingOrder": 1,
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"status": "PENDING",
												"documentIds": [
													"cm4k2x9p10003abcd1234efgh",
													"cm4k2x9p10022abcd1234efgh"
												]
											}
										]
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"bundle.party.signed": {
			"post": {
				"summary": "bundle.party.signed",
				"operationId": "webhook_bundle_party_signed",
				"description": "Fires once per person, when that person has nothing left to sign in the bundle and signed at least one document in it. `data.documentIds` lists the documents the person signed. A person who rejects some documents and signs the rest fires it for the signed ones; a person who rejects every document doesn't fire it. Each document also fires `document.party.signed`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Bundles",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"bundle.party.signed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookBundlePartySignedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "bundle.party.signed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": null,
								"data": {
									"object": {
										"id": "cm4k2x9p10044abcd1234efgh",
										"name": "Anställningspaket – Kai Lindqvist",
										"status": "OPEN",
										"subject": "Ditt anställningspaket från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal och sekretessavtalet. Signera båda med BankID senast den 28 oktober.",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"signingMode": "PARALLEL",
										"language": "sv",
										"reminderIntervalDays": 3,
										"signableAfterExpired": false,
										"internalRecipients": [
											"hr@example.com"
										],
										"nationalIdDisplayMode": null,
										"openVerification": null,
										"sendPlainTextEmailOnly": null,
										"redirectUrl": null,
										"redirectEnabled": false,
										"documentCount": 2,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"documents": [
											{
												"id": "cm4k2x9p10003abcd1234efgh",
												"name": "Anställningsavtal – Kai Lindqvist",
												"status": "COMPLETED",
												"parties": [
													{
														"id": "cm4k2x9p10004abcd1234efgh",
														"bundlePartyId": "cm4k2x9p10091abcd1234efgh",
														"name": "Kai Lindqvist",
														"email": "kai@example.com",
														"role": "SIGNER",
														"signingStatus": "SIGNED",
														"signedAt": "2026-09-29T07:41:00.000Z"
													}
												]
											},
											{
												"id": "cm4k2x9p10022abcd1234efgh",
												"name": "Sekretessavtal – Kai Lindqvist",
												"status": "COMPLETED",
												"parties": [
													{
														"id": "cm4k2x9p10090abcd1234efgh",
														"bundlePartyId": "cm4k2x9p10091abcd1234efgh",
														"name": "Kai Lindqvist",
														"email": "kai@example.com",
														"role": "SIGNER",
														"signingStatus": "SIGNED",
														"signedAt": "2026-09-29T07:41:00.000Z"
													}
												]
											}
										],
										"parties": [
											{
												"id": "cm4k2x9p10091abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"phone": "+46701740605",
												"role": "SIGNER",
												"signingOrder": 1,
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"status": "SIGNED",
												"documentIds": [
													"cm4k2x9p10003abcd1234efgh",
													"cm4k2x9p10022abcd1234efgh"
												]
											}
										]
									},
									"party": {
										"email": "kai@example.com",
										"name": "Kai Lindqvist"
									},
									"documentIds": [
										"cm4k2x9p10003abcd1234efgh",
										"cm4k2x9p10022abcd1234efgh"
									]
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"bundle.completed": {
			"post": {
				"summary": "bundle.completed",
				"operationId": "webhook_bundle_completed",
				"description": "Fires when no party has a signature left to give on any document in the bundle, so a bundle with a rejected document completes too. Each signed document fires its own `document.completed` once its sealed PDF is ready, which can be after this event.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Bundles",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"bundle.completed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookBundleCompletedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "bundle.completed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": null,
								"data": {
									"object": {
										"id": "cm4k2x9p10044abcd1234efgh",
										"name": "Anställningspaket – Kai Lindqvist",
										"status": "COMPLETED",
										"subject": "Ditt anställningspaket från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal och sekretessavtalet. Signera båda med BankID senast den 28 oktober.",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"signingMode": "PARALLEL",
										"language": "sv",
										"reminderIntervalDays": 3,
										"signableAfterExpired": false,
										"internalRecipients": [
											"hr@example.com"
										],
										"nationalIdDisplayMode": null,
										"openVerification": null,
										"sendPlainTextEmailOnly": null,
										"redirectUrl": null,
										"redirectEnabled": false,
										"documentCount": 2,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"documents": [
											{
												"id": "cm4k2x9p10003abcd1234efgh",
												"name": "Anställningsavtal – Kai Lindqvist",
												"status": "COMPLETED",
												"parties": [
													{
														"id": "cm4k2x9p10004abcd1234efgh",
														"bundlePartyId": "cm4k2x9p10091abcd1234efgh",
														"name": "Kai Lindqvist",
														"email": "kai@example.com",
														"role": "SIGNER",
														"signingStatus": "SIGNED",
														"signedAt": "2026-09-29T07:41:00.000Z"
													}
												]
											},
											{
												"id": "cm4k2x9p10022abcd1234efgh",
												"name": "Sekretessavtal – Kai Lindqvist",
												"status": "COMPLETED",
												"parties": [
													{
														"id": "cm4k2x9p10090abcd1234efgh",
														"bundlePartyId": "cm4k2x9p10091abcd1234efgh",
														"name": "Kai Lindqvist",
														"email": "kai@example.com",
														"role": "SIGNER",
														"signingStatus": "SIGNED",
														"signedAt": "2026-09-29T07:41:00.000Z"
													}
												]
											}
										],
										"parties": [
											{
												"id": "cm4k2x9p10091abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"phone": "+46701740605",
												"role": "SIGNER",
												"signingOrder": 1,
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"status": "SIGNED",
												"documentIds": [
													"cm4k2x9p10003abcd1234efgh",
													"cm4k2x9p10022abcd1234efgh"
												]
											}
										]
									},
									"documentIds": [
										"cm4k2x9p10003abcd1234efgh",
										"cm4k2x9p10022abcd1234efgh"
									]
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"bundle.cancelled": {
			"post": {
				"summary": "bundle.cancelled",
				"operationId": "webhook_bundle_cancelled",
				"description": "Fires when a sender cancels a bundle and every unsigned document in it was withdrawn. `data.documentIds` lists the withdrawn documents, which are back in `DRAFT` and no longer in the bundle; each also fires `document.withdrawn`. A cancel that couldn't withdraw every document leaves the bundle `OPEN` and doesn't fire it. Withdrawing a bundle back to `DRAFT` with `POST /api/v1/bundles/{id}/withdraw` doesn't fire it either.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Bundles",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"bundle.cancelled"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookBundleCanceledData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "bundle.cancelled",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10044abcd1234efgh",
										"name": "Anställningspaket – Kai Lindqvist",
										"status": "CANCELED",
										"subject": "Ditt anställningspaket från Exempelbolaget AB",
										"message": "Hej Kai! Här är ditt anställningsavtal och sekretessavtalet. Signera båda med BankID senast den 28 oktober.",
										"expiresAt": "2026-10-28T22:00:00.000Z",
										"signingMode": "PARALLEL",
										"language": "sv",
										"reminderIntervalDays": 3,
										"signableAfterExpired": false,
										"internalRecipients": [
											"hr@example.com"
										],
										"nationalIdDisplayMode": null,
										"openVerification": null,
										"sendPlainTextEmailOnly": null,
										"redirectUrl": null,
										"redirectEnabled": false,
										"documentCount": 0,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"documents": [],
										"parties": [
											{
												"id": "cm4k2x9p10091abcd1234efgh",
												"name": "Kai Lindqvist",
												"email": "kai@example.com",
												"phone": "+46701740605",
												"role": "SIGNER",
												"signingOrder": 1,
												"delivery": [
													"EMAIL"
												],
												"signatureMethod": "SE_BANKID",
												"signVerification": null,
												"openVerification": null,
												"status": "PENDING",
												"documentIds": []
											}
										]
									},
									"documentIds": [
										"cm4k2x9p10003abcd1234efgh",
										"cm4k2x9p10022abcd1234efgh"
									]
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"archive_import.completed": {
			"post": {
				"summary": "archive_import.completed",
				"operationId": "webhook_archive_import_completed",
				"description": "Fires when an archive import finishes a run: once for the first run and once for each retry of the documents that failed. The counts are cumulative, so the latest event has the current totals. The documents an import creates fire no `document.created`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Archive imports",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"archive_import.completed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookArchiveImportCompletedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "archive_import.completed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": null,
								"data": {
									"object": {
										"id": "cm4k2x9p10045abcd1234efgh",
										"name": "Oneflow-export 2026",
										"source": "ONEFLOW",
										"totalItems": 2735,
										"importedCount": 2731,
										"skippedCount": 0,
										"failedCount": 4,
										"runAttempt": 1,
										"startedAt": "2026-09-28T09:12:00.000Z",
										"completedAt": "2026-09-28T09:15:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"archive_import.undone": {
			"post": {
				"summary": "archive_import.undone",
				"operationId": "webhook_archive_import_undone",
				"description": "Fires once when an archive import is undone. Its documents move to the trash without firing `document.deleted`, except the ones that were sent or signed after the import, which are kept.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Archive imports",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"archive_import.undone"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookArchiveImportUndoneData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "archive_import.undone",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10045abcd1234efgh",
										"name": "Oneflow-export 2026",
										"source": "ONEFLOW",
										"trashedCount": 2729,
										"keptCount": 2,
										"undoneAt": "2026-09-28T14:03:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"identity_check.created": {
			"post": {
				"summary": "identity_check.created",
				"operationId": "webhook_identity_check_created",
				"description": "Fires when an identity check is created.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Identity checks",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"identity_check.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookIdentityCheckData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "identity_check.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10025abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"fullName": "Kai Lindqvist",
										"email": "kai@example.com",
										"phone": null,
										"channel": "EMAIL",
										"status": "CREATED",
										"reference": "hr-candidate-4821",
										"language": "sv",
										"expiresAt": "2026-10-05T09:12:00.000Z",
										"verifiedAt": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z",
										"verificationUrl": null,
										"contact": {
											"id": "cm4k2x9p10006abcd1234efgh",
											"firstName": "Kai",
											"lastName": "Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605"
										},
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"audits": null,
										"data": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"identity_check.sent": {
			"post": {
				"summary": "identity_check.sent",
				"operationId": "webhook_identity_check_sent",
				"description": "Fires when sajn sends the verification link to the person, by email or SMS.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Identity checks",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"identity_check.sent"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookIdentityCheckData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "identity_check.sent",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10025abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"fullName": "Kai Lindqvist",
										"email": "kai@example.com",
										"phone": null,
										"channel": "EMAIL",
										"status": "SENT",
										"reference": "hr-candidate-4821",
										"language": "sv",
										"expiresAt": "2026-10-05T09:12:00.000Z",
										"verifiedAt": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"verificationUrl": null,
										"contact": {
											"id": "cm4k2x9p10006abcd1234efgh",
											"firstName": "Kai",
											"lastName": "Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605"
										},
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"audits": null,
										"data": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"identity_check.opened": {
			"post": {
				"summary": "identity_check.opened",
				"operationId": "webhook_identity_check_opened",
				"description": "Fires when the person opens the verification link.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Identity checks",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"identity_check.opened"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookIdentityCheckData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "identity_check.opened",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10025abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"fullName": "Kai Lindqvist",
										"email": "kai@example.com",
										"phone": null,
										"channel": "EMAIL",
										"status": "OPENED",
										"reference": "hr-candidate-4821",
										"language": "sv",
										"expiresAt": "2026-10-05T09:12:00.000Z",
										"verifiedAt": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"verificationUrl": null,
										"contact": {
											"id": "cm4k2x9p10006abcd1234efgh",
											"firstName": "Kai",
											"lastName": "Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605"
										},
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"audits": null,
										"data": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"identity_check.verified": {
			"post": {
				"summary": "identity_check.verified",
				"operationId": "webhook_identity_check_verified",
				"description": "Fires when the person completes the verification.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Identity checks",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"identity_check.verified"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookIdentityCheckData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "identity_check.verified",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10025abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"fullName": "Kai Lindqvist",
										"email": "kai@example.com",
										"phone": null,
										"channel": "EMAIL",
										"status": "VERIFIED",
										"reference": "hr-candidate-4821",
										"language": "sv",
										"expiresAt": "2026-10-05T09:12:00.000Z",
										"verifiedAt": "2026-09-28T14:03:00.000Z",
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"verificationUrl": null,
										"contact": {
											"id": "cm4k2x9p10006abcd1234efgh",
											"firstName": "Kai",
											"lastName": "Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605"
										},
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"audits": null,
										"data": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"identity_check.failed": {
			"post": {
				"summary": "identity_check.failed",
				"operationId": "webhook_identity_check_failed",
				"description": "Fires when the verification fails. `failureReason` says why.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Identity checks",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"identity_check.failed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookIdentityCheckFailedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "identity_check.failed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10025abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"fullName": "Kai Lindqvist",
										"email": "kai@example.com",
										"phone": null,
										"channel": "EMAIL",
										"status": "FAILED",
										"reference": "hr-candidate-4821",
										"language": "sv",
										"expiresAt": "2026-10-05T09:12:00.000Z",
										"verifiedAt": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"verificationUrl": null,
										"contact": {
											"id": "cm4k2x9p10006abcd1234efgh",
											"firstName": "Kai",
											"lastName": "Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605"
										},
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"audits": null,
										"data": null
									},
									"failureReason": "expiredTransaction"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"identity_check.cancelled": {
			"post": {
				"summary": "identity_check.cancelled",
				"operationId": "webhook_identity_check_cancelled",
				"description": "Fires when the identity check is canceled.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Identity checks",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"identity_check.cancelled"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookIdentityCheckData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "identity_check.cancelled",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10025abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"fullName": "Kai Lindqvist",
										"email": "kai@example.com",
										"phone": null,
										"channel": "EMAIL",
										"status": "CANCELLED",
										"reference": "hr-candidate-4821",
										"language": "sv",
										"expiresAt": "2026-10-05T09:12:00.000Z",
										"verifiedAt": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T14:03:00.000Z",
										"verificationUrl": null,
										"contact": {
											"id": "cm4k2x9p10006abcd1234efgh",
											"firstName": "Kai",
											"lastName": "Lindqvist",
											"email": "kai@example.com",
											"phone": "+46701740605"
										},
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"audits": null,
										"data": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"contact.created": {
			"post": {
				"summary": "contact.created",
				"operationId": "webhook_contact_created",
				"description": "Fires when a contact is created.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Contacts",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"contact.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookContactData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "contact.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"email": "kai@example.com",
										"phone": "+46701740605",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"nationalId": null,
										"externalId": "hr-candidate-4821",
										"addressLine1": "Storgatan 12",
										"addressLine2": null,
										"postalCode": "411 38",
										"city": "Göteborg",
										"state": null,
										"country": "SE",
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z",
										"companyRole": "Projektledare",
										"company": {
											"id": "cm4k2x9p10007abcd1234efgh",
											"name": "Nordljus AB",
											"orgNumber": "5560000000",
											"country": "SE",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"contact.updated": {
			"post": {
				"summary": "contact.updated",
				"operationId": "webhook_contact_updated",
				"description": "Fires when a contact's details change.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Contacts",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"contact.updated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookContactData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "contact.updated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"email": "kai@example.com",
										"phone": "+46701740605",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"nationalId": null,
										"externalId": "hr-candidate-4821",
										"addressLine1": "Storgatan 12",
										"addressLine2": null,
										"postalCode": "411 38",
										"city": "Göteborg",
										"state": null,
										"country": "SE",
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"companyRole": "Projektledare",
										"company": {
											"id": "cm4k2x9p10007abcd1234efgh",
											"name": "Nordljus AB",
											"orgNumber": "5560000000",
											"country": "SE",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"contact.deleted": {
			"post": {
				"summary": "contact.deleted",
				"operationId": "webhook_contact_deleted",
				"description": "Fires when a contact is deleted.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Contacts",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"contact.deleted"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookContactData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "contact.deleted",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10006abcd1234efgh",
										"email": "kai@example.com",
										"phone": "+46701740605",
										"firstName": "Kai",
										"lastName": "Lindqvist",
										"nationalId": null,
										"externalId": "hr-candidate-4821",
										"addressLine1": "Storgatan 12",
										"addressLine2": null,
										"postalCode": "411 38",
										"city": "Göteborg",
										"state": null,
										"country": "SE",
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"companyRole": "Projektledare",
										"company": {
											"id": "cm4k2x9p10007abcd1234efgh",
											"name": "Nordljus AB",
											"orgNumber": "5560000000",
											"country": "SE",
											"createdAt": "2026-09-28T09:12:00.000Z",
											"updatedAt": "2026-09-28T09:15:00.000Z"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"company.created": {
			"post": {
				"summary": "company.created",
				"operationId": "webhook_company_created",
				"description": "Fires when a company is created, including when sajn creates one for a new contact's company name.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Contacts",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"company.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookCompanyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "company.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10007abcd1234efgh",
										"name": "Nordljus AB",
										"orgNumber": "5560000000",
										"country": "SE",
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"company.updated": {
			"post": {
				"summary": "company.updated",
				"operationId": "webhook_company_updated",
				"description": "Fires when a company's name, organization number or country changes.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Contacts",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"company.updated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookCompanyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "company.updated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10007abcd1234efgh",
										"name": "Nordljus AB",
										"orgNumber": "5560000000",
										"country": "SE",
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"company.deleted": {
			"post": {
				"summary": "company.deleted",
				"operationId": "webhook_company_deleted",
				"description": "Fires when a company is deleted.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Contacts",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"company.deleted"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookCompanyData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "company.deleted",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10007abcd1234efgh",
										"name": "Nordljus AB",
										"orgNumber": "5560000000",
										"country": "SE",
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"template.created": {
			"post": {
				"summary": "template.created",
				"operationId": "webhook_template_created",
				"description": "Fires when a template is created, including when a template is duplicated.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Templates and forms",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"template.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookTemplateData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "template.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10008abcd1234efgh",
										"name": "Anställningsavtal",
										"workspaceId": "cm4k2x9p10001abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"isGlobal": false,
										"templateMeta": null,
										"parties": [],
										"tags": [],
										"content": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z",
										"deletedAt": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"template.updated": {
			"post": {
				"summary": "template.updated",
				"operationId": "webhook_template_updated",
				"description": "Fires when a template changes. `previousAttributes` holds the earlier values of the fields of `object` that changed; a change to a setting outside `object` sends it empty. sajn sends at most one event per template per minute and drops the others, so treat the event as a signal to read the template again, not as a complete change log.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Templates and forms",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"template.updated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookTemplateUpdatedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "template.updated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10008abcd1234efgh",
										"name": "Anställningsavtal",
										"workspaceId": "cm4k2x9p10001abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"isGlobal": false,
										"templateMeta": null,
										"parties": [],
										"tags": [],
										"content": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"deletedAt": null
									},
									"previousAttributes": {
										"name": "Anställningsavtal 2025"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"template.deleted": {
			"post": {
				"summary": "template.deleted",
				"operationId": "webhook_template_deleted",
				"description": "Fires when a template moves to the trash.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Templates and forms",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"template.deleted"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookTemplateData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "template.deleted",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10008abcd1234efgh",
										"name": "Anställningsavtal",
										"workspaceId": "cm4k2x9p10001abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"isGlobal": false,
										"templateMeta": null,
										"parties": [],
										"tags": [],
										"content": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"deletedAt": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"template.restored": {
			"post": {
				"summary": "template.restored",
				"operationId": "webhook_template_restored",
				"description": "Fires when a template is restored from the trash.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Templates and forms",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"template.restored"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookTemplateData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "template.restored",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10008abcd1234efgh",
										"name": "Anställningsavtal",
										"workspaceId": "cm4k2x9p10001abcd1234efgh",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"isGlobal": false,
										"templateMeta": null,
										"parties": [],
										"tags": [],
										"content": null,
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z",
										"deletedAt": null
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"form.submitted": {
			"post": {
				"summary": "form.submitted",
				"operationId": "webhook_form_submitted",
				"description": "Fires once per submission, when the respondent submits the form. `answers` holds the answers by field key, and `documentId` is the document created from the submission.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Templates and forms",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"form.submitted"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookFormSubmissionData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "form.submitted",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10024abcd1234efgh",
										"formId": "cm4k2x9p10023abcd1234efgh",
										"status": "SUBMITTED",
										"respondentName": "Kai Lindqvist",
										"respondentEmail": "kai@example.com",
										"respondentPhone": null,
										"answers": {
											"role": "Projektledare",
											"startDate": "2026-11-01"
										},
										"documentId": "cm4k2x9p10040abcd1234efgh",
										"startedAt": "2026-09-28T09:12:00.000Z",
										"submittedAt": "2026-09-28T09:15:00.000Z",
										"updatedAt": "2026-09-28T09:15:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"workspace.created": {
			"post": {
				"summary": "workspace.created",
				"operationId": "webhook_workspace_created",
				"description": "Fires when a workspace is created.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Workspace",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"workspace.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookWorkspaceData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "workspace.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10001abcd1234efgh",
										"slug": "hr",
										"name": "HR",
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"createdBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"createdAt": "2026-09-28T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"member.added": {
			"post": {
				"summary": "member.added",
				"operationId": "webhook_member_added",
				"description": "Fires when a user joins a workspace. `via` is `INVITE` when the user accepted an invitation, and `ADMIN` when an administrator added them.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Workspace",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"member.added"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookMemberAddedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "member.added",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10002abcd1234efgh",
										"email": "alex@example.com",
										"name": "Alex Berg",
										"role": {
											"id": "cm4k2x9p10026abcd1234efgh",
											"name": "Rekryterare"
										},
										"status": "INACTIVE",
										"lastActiveAt": null,
										"joinedAt": "2026-09-28T09:12:00.000Z"
									},
									"via": "INVITE"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"member.invited": {
			"post": {
				"summary": "member.invited",
				"operationId": "webhook_member_invited",
				"description": "Fires when sajn sends someone an invitation to join the workspace. When the invitee accepts, `member.invite_accepted` and `member.added` fire.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Workspace",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"member.invited"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookMemberInviteData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "member.invited",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10027abcd1234efgh",
										"email": "robin@example.com",
										"role": {
											"id": "cm4k2x9p10026abcd1234efgh",
											"name": "Rekryterare"
										},
										"status": "PENDING",
										"invitedBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"expiresAt": "2026-09-30T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"member.invite_accepted": {
			"post": {
				"summary": "member.invite_accepted",
				"operationId": "webhook_member_invite_accepted",
				"description": "Fires when the invitee accepts an invitation to the workspace. `member.added` also fires, with the new member.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Workspace",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"member.invite_accepted"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookMemberInviteData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "member.invite_accepted",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10027abcd1234efgh",
										"email": "robin@example.com",
										"role": {
											"id": "cm4k2x9p10026abcd1234efgh",
											"name": "Rekryterare"
										},
										"status": "ACCEPTED",
										"invitedBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"createdAt": "2026-09-28T09:12:00.000Z",
										"expiresAt": "2026-09-30T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"approval_request.created": {
			"post": {
				"summary": "approval_request.created",
				"operationId": "webhook_approval_request_created",
				"description": "Fires when a document is submitted for internal approval, from the app or with `POST /api/v1/approval-requests`. It fires again when a rejected request is resubmitted: the request keeps its `id`, and every approver's step starts over at `PENDING`, so sajn keeps no history of earlier rounds.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Approvals",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"approval_request.created"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookApprovalRequestData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "approval_request.created",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10029abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"status": "PENDING",
										"autoSend": true,
										"customMessage": null,
										"requestedBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"approvers": [
											{
												"user": {
													"id": "cm4k2x9p10041abcd1234efgh",
													"email": "quinn@example.com",
													"name": "Quinn Holm"
												},
												"stage": 0,
												"orGroup": null,
												"status": "PENDING",
												"comment": null,
												"resolvedAt": null
											}
										],
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"approval_request.approved": {
			"post": {
				"summary": "approval_request.approved",
				"operationId": "webhook_approval_request_approved",
				"description": "Fires when the last required approver approves. With `autoSend` set to true, sajn then sends the document, which fires `document.sent`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Approvals",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"approval_request.approved"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookApprovalRequestData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "approval_request.approved",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10029abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"status": "APPROVED",
										"autoSend": true,
										"customMessage": null,
										"requestedBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"approvers": [
											{
												"user": {
													"id": "cm4k2x9p10041abcd1234efgh",
													"email": "quinn@example.com",
													"name": "Quinn Holm"
												},
												"stage": 0,
												"orGroup": null,
												"status": "APPROVED",
												"comment": "Godkänt enligt lönepolicyn.",
												"resolvedAt": "2026-09-28T14:03:00.000Z"
											}
										],
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"approval_request.rejected": {
			"post": {
				"summary": "approval_request.rejected",
				"operationId": "webhook_approval_request_rejected",
				"description": "Fires when an approver rejects the request. The document returns to `DRAFT`.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Approvals",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"approval_request.rejected"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookApprovalRequestData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "approval_request.rejected",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10029abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"status": "REJECTED",
										"autoSend": true,
										"customMessage": null,
										"requestedBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"approvers": [
											{
												"user": {
													"id": "cm4k2x9p10041abcd1234efgh",
													"email": "quinn@example.com",
													"name": "Quinn Holm"
												},
												"stage": 0,
												"orGroup": null,
												"status": "REJECTED",
												"comment": "Fel startdatum i avtalet.",
												"resolvedAt": "2026-09-28T14:03:00.000Z"
											}
										],
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"approval_request.cancelled": {
			"post": {
				"summary": "approval_request.cancelled",
				"operationId": "webhook_approval_request_cancelled",
				"description": "Fires when the requester cancels a pending request. sajn deletes the request, and the document returns to `DRAFT`. `GET /api/v1/approval-requests/{id}` then returns `404` for its `id`, so `data.object` is the only record of the request as it was when it was cancelled.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Approvals",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"approval_request.cancelled"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookApprovalRequestData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "approval_request.cancelled",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10029abcd1234efgh",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"status": "CANCELLED",
										"autoSend": true,
										"customMessage": null,
										"requestedBy": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"approvers": [
											{
												"user": {
													"id": "cm4k2x9p10041abcd1234efgh",
													"email": "quinn@example.com",
													"name": "Quinn Holm"
												},
												"stage": 0,
												"orGroup": null,
												"status": "PENDING",
												"comment": null,
												"resolvedAt": null
											}
										],
										"createdAt": "2026-09-28T09:12:00.000Z",
										"updatedAt": "2026-09-28T09:12:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"login.completed": {
			"post": {
				"summary": "login.completed",
				"operationId": "webhook_login_completed",
				"description": "Fires when a user completes a sajn Login authentication, also when the browser never returns to your app. `data.object` is the session with `claims` set to null, so the event carries no identity, only the pairwise `sub`. With the Session API, read the claims with `GET /api/v1/login/sessions/{id}`. The event isn't a credential: never treat it as a signed-in session. `actor` is always null.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "sajn Login",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"login.completed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookLoginCompletedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "login.completed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": null,
								"data": {
									"object": {
										"id": "cm4k2x9p10033abcd1234efgh",
										"status": "COMPLETED",
										"method": "SE_BANKID",
										"completedAt": "2026-09-28T14:03:00.000Z",
										"state": "checkout-7731",
										"sub": "cm4k2x9p10041abcd1234efgh",
										"claims": null,
										"loginUrl": null,
										"expiresAt": null
									},
									"clientId": "cm4k2x9p10039abcd1234efgh",
									"mode": "SESSION"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"login.failed": {
			"post": {
				"summary": "login.failed",
				"operationId": "webhook_login_failed",
				"description": "Fires when a sajn Login authentication ends in a failure that the user can't retry in the same session, such as an expired transaction. Failures the user can retry, such as a canceled BankID, don't fire it. `data.failureReason` is the failure the eID provider reported. `actor` is always null.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "sajn Login",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"login.failed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookLoginFailedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "login.failed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": null,
								"data": {
									"object": {
										"id": "cm4k2x9p10033abcd1234efgh",
										"status": "FAILED",
										"method": null,
										"completedAt": null,
										"state": "checkout-7731",
										"sub": null,
										"claims": null,
										"loginUrl": null,
										"expiresAt": null
									},
									"clientId": "cm4k2x9p10039abcd1234efgh",
									"mode": "SESSION",
									"failureReason": "expiredTransaction"
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"security.document_downloaded": {
			"post": {
				"summary": "security.document_downloaded",
				"operationId": "webhook_security_document_downloaded",
				"description": "Fires when someone downloads a document file: the original, the signed document, or the audit journal. Forward it to your SIEM or audit log. `actor` is the user or API key that downloaded it.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Security",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"security.document_downloaded"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookSecurityDocumentDownloadedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "security.document_downloaded",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"ipAddress": "192.0.2.24",
										"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/19.0 Safari/605.1.15",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"documentName": "Anställningsavtal – Kai Lindqvist",
										"fileType": "SIGNED",
										"user": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"security.documents_exported": {
			"post": {
				"summary": "security.documents_exported",
				"operationId": "webhook_security_documents_exported",
				"description": "Fires when someone exports documents in bulk, from a selection or a whole folder. The payload carries counts, not document IDs.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Security",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"security.documents_exported"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookSecurityDocumentsExportedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "security.documents_exported",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"ipAddress": "192.0.2.24",
										"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/19.0 Safari/605.1.15",
										"documentCount": 48,
										"fileCount": 96,
										"scope": "FOLDER",
										"folderId": "cm4k2x9p10011abcd1234efgh",
										"folderName": "Anställningsavtal 2026",
										"user": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"security.signature_identity_accessed": {
			"post": {
				"summary": "security.signature_identity_accessed",
				"operationId": "webhook_security_signature_identity_accessed",
				"description": "Fires when someone reads a document's signatures together with the signers' identity data. The payload carries counts only, never the identity values.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Security",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"security.signature_identity_accessed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookSecuritySignatureIdentityAccessedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "security.signature_identity_accessed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"ipAddress": "192.0.2.24",
										"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/19.0 Safari/605.1.15",
										"documentId": "cm4k2x9p10003abcd1234efgh",
										"documentName": "Anställningsavtal – Kai Lindqvist",
										"signatureCount": 2,
										"identityCount": 2,
										"nationalIdDisplayMode": "PARTIAL",
										"user": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"security.member_removed": {
			"post": {
				"summary": "security.member_removed",
				"operationId": "webhook_security_member_removed",
				"description": "Fires when a member is removed from the workspace. `reassignedDocumentCount` is the number of the member's documents that moved to someone else, or `null` when the removal doesn't reassign documents.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Security",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"security.member_removed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookSecurityWorkspaceMemberRemovedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "security.member_removed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"ipAddress": "192.0.2.24",
										"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/19.0 Safari/605.1.15",
										"user": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"member": {
											"id": "cm4k2x9p10041abcd1234efgh",
											"email": "quinn@example.com",
											"name": "Quinn Holm"
										},
										"reassignedDocumentCount": 12
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"security.member_role_changed": {
			"post": {
				"summary": "security.member_role_changed",
				"operationId": "webhook_security_member_role_changed",
				"description": "Fires when a workspace member gets a different role.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Security",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"security.member_role_changed"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookSecurityWorkspaceMemberRoleChangedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "security.member_role_changed",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"ipAddress": "192.0.2.24",
										"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/19.0 Safari/605.1.15",
										"user": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										},
										"member": {
											"id": "cm4k2x9p10041abcd1234efgh",
											"email": "quinn@example.com",
											"name": "Quinn Holm"
										},
										"previousRoleId": null,
										"roleId": "cm4k2x9p10026abcd1234efgh"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"security.role_updated": {
			"post": {
				"summary": "security.role_updated",
				"operationId": "webhook_security_role_updated",
				"description": "Fires every time a workspace role's definition is saved, even when its permissions stay the same. The change applies to every member who holds the role.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Security",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"security.role_updated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookSecurityWorkspaceRoleUpdatedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "security.role_updated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"ipAddress": "192.0.2.24",
										"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/19.0 Safari/605.1.15",
										"roleId": "cm4k2x9p10026abcd1234efgh",
										"roleName": "Rekryterare",
										"permissions": [
											"documents:read",
											"documents:write"
										],
										"user": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"security.workspace_retention_updated": {
			"post": {
				"summary": "security.workspace_retention_updated",
				"operationId": "webhook_security_workspace_retention_updated",
				"description": "Fires when the workspace's retention periods change. A shorter period shortens how long sajn keeps the documents.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Security",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"security.workspace_retention_updated"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookSecurityWorkspaceRetentionUpdatedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "security.workspace_retention_updated",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"ipAddress": "192.0.2.24",
										"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/19.0 Safari/605.1.15",
										"workspaceName": "HR",
										"previousCompletedRetentionDays": null,
										"previousTrashRetentionDays": 30,
										"completedRetentionDays": 3650,
										"trashRetentionDays": 30,
										"user": {
											"id": "cm4k2x9p10002abcd1234efgh",
											"email": "alex@example.com",
											"name": "Alex Berg"
										}
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"usage.limit_reached": {
			"post": {
				"summary": "usage.limit_reached",
				"operationId": "webhook_usage_limit_reached",
				"description": "Fires when the organization reaches its monthly document quota or an eID signature quota, at most once per quota and billing period. Signatures beyond the quota are billed from the balance; documents beyond it are refused until the period ends or the plan changes. `GET /api/v1/limits` returns the current usage.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Usage",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"usage.limit_reached"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookUsageLimitReachedData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "usage.limit_reached",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"organizationId": "cm4k2x9p10000abcd1234efgh",
										"resource": "SIGNATURES",
										"scheme": "SE_BANKID",
										"quota": 100,
										"used": 100,
										"periodStart": "2026-10-01T00:00:00.000Z"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		},
		"webhook.test": {
			"post": {
				"summary": "webhook.test",
				"operationId": "webhook_webhook_test",
				"description": "Sent to one webhook when you call `POST /api/v1/webhooks/{id}/test`, to check that your endpoint receives and verifies deliveries. No other webhook receives it, and `GET /api/v1/events` doesn't list it.",
				"tags": [
					"Webhook events"
				],
				"x-sajn-webhook-group": "Workspace",
				"parameters": [
					{
						"name": "webhook-id",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "cm4k2x9p10014abcd1234efgh",
						"description": "The event `id`. It stays the same across retries and replays, so deduplicate on it."
					},
					{
						"name": "webhook-timestamp",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string"
						},
						"example": "1759304580",
						"description": "When sajn sent this attempt, in Unix seconds. Reject a timestamp older than your tolerance, such as five minutes."
					},
					{
						"name": "webhook-signature",
						"in": "header",
						"required": false,
						"schema": {
							"type": "string"
						},
						"example": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=",
						"description": "One or more space-separated signatures, `v1,<base64 HMAC-SHA256>`, over `<webhook-id>.<webhook-timestamp>.<raw request body>`. The key is the base64 decoding of the secret after `whsec_`. Accept the request when any signature matches; for 24 hours after a secret rotation, there is one per secret. Any Standard Webhooks library verifies it. Webhooks created without a secret don't send this header."
					},
					{
						"name": "Sajn-Version",
						"in": "header",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"2026-10"
							]
						},
						"description": "The endpoint's API version, the same value as `apiVersion` in the body."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"required": [
									"id",
									"type",
									"createdAt",
									"apiVersion",
									"workspaceId",
									"organizationId",
									"environment",
									"actor",
									"data"
								],
								"properties": {
									"id": {
										"type": "string",
										"description": "Event ID, also in `webhook-id`. It's the same on every retry, replay and endpoint that receives the event, so deduplicate on it. To read the event again, pass it to `GET /api/v1/events/{id}`."
									},
									"type": {
										"type": "string",
										"enum": [
											"webhook.test"
										]
									},
									"createdAt": {
										"type": "string",
										"format": "date-time",
										"description": "When the event happened. It doesn't change across retries and replays."
									},
									"apiVersion": {
										"type": "string",
										"enum": [
											"2026-10"
										],
										"description": "The endpoint's API version, which sets the shape of `data`."
									},
									"workspaceId": {
										"type": "string"
									},
									"organizationId": {
										"type": "string",
										"description": "The organization the event happened in."
									},
									"environment": {
										"type": "string",
										"enum": [
											"PRODUCTION",
											"SANDBOX"
										],
										"description": "`SANDBOX` for an event in a sandbox organization."
									},
									"actor": {
										"anyOf": [
											{
												"$ref": "#/components/schemas/WebhookActor"
											},
											{
												"type": "null"
											}
										]
									},
									"data": {
										"$ref": "#/components/schemas/WebhookTestData"
									}
								}
							},
							"example": {
								"id": "cm4k2x9p10014abcd1234efgh",
								"type": "webhook.test",
								"createdAt": "2026-09-28T14:03:00.000Z",
								"apiVersion": "2026-10",
								"workspaceId": "cm4k2x9p10001abcd1234efgh",
								"organizationId": "cm4k2x9p10000abcd1234efgh",
								"environment": "PRODUCTION",
								"actor": {
									"type": "USER",
									"id": "cm4k2x9p10002abcd1234efgh"
								},
								"data": {
									"object": {
										"id": "cm4k2x9p10013abcd1234efgh",
										"url": "https://example.com/webhooks/sajn"
									}
								}
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Return any `2xx` status code within 30 seconds to acknowledge the delivery. sajn retries any other status code, a redirect, a timeout and a network error with backoff for about three days, 12 attempts in all. A `410 Gone` stops the retries and pauses the webhook."
					}
				}
			}
		}
	}
}
